added ui for show_breaks

This commit is contained in:
Kima
2024-02-08 20:23:16 +01:00
parent 23b6e1b8c7
commit 8c654beb05
3 changed files with 48 additions and 1 deletions

View File

@@ -285,6 +285,44 @@ class GeneralSettingsScreenState extends State<GeneralSettingsScreen> {
),
],
),
SplittedPanel(
padding: const EdgeInsets.only(top: 9.0),
cardPadding: const EdgeInsets.all(4.0),
isSeparated: true,
children: [
PanelButton(
padding: const EdgeInsets.only(left: 14.0, right: 6.0),
onPressed: () {
settingsProvider.update(
showBreaks: !settingsProvider.showBreaks);
setState(() {});
},
title: Text(
"show_breaks".i18n,
style: TextStyle(
color: AppColors.of(context).text.withOpacity(
settingsProvider.showBreaks ? .95 : .25),
),
),
leading: Icon(
FeatherIcons.eye,
size: 22.0,
color: AppColors.of(context)
.text
.withOpacity(settingsProvider.showBreaks ? .95 : .25),
),
trailing: Switch(
onChanged: (v) => settingsProvider.update(showBreaks: v),
value: settingsProvider.showBreaks,
activeColor: Theme.of(context).colorScheme.secondary,
),
borderRadius: const BorderRadius.vertical(
top: Radius.circular(12.0),
bottom: Radius.circular(12.0),
),
),
],
),
],
),
),