mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-05-14 05:52:51 +00:00
Save settings on shared preferences
This commit is contained in:
parent
3eaf7143f2
commit
794b690c91
7 changed files with 242 additions and 465 deletions
|
@ -120,7 +120,7 @@ class _CustomizationWidgetState extends State<CustomizationWidget> {
|
|||
label: AppLocalizations.of(context)!.color,
|
||||
padding: const EdgeInsets.only(top: 45, left: 16, right: 16, bottom: 5),
|
||||
),
|
||||
if (appConfigProvider.androidDeviceInfo != null && appConfigProvider.androidDeviceInfo!.version.sdkInt >= 31) CustomSwitchListTile(
|
||||
if (appConfigProvider.supportsDynamicTheme) CustomSwitchListTile(
|
||||
value: dynamicColor,
|
||||
onChanged: (value) {
|
||||
setState(() => dynamicColor = value);
|
||||
|
@ -129,7 +129,10 @@ class _CustomizationWidgetState extends State<CustomizationWidget> {
|
|||
title: AppLocalizations.of(context)!.useDynamicTheme,
|
||||
),
|
||||
if (!(appConfigProvider.androidDeviceInfo != null && appConfigProvider.androidDeviceInfo!.version.sdkInt >= 31)) const SizedBox(height: 20),
|
||||
if (dynamicColor == false) Padding(
|
||||
if (
|
||||
appConfigProvider.supportsDynamicTheme == false ||
|
||||
(appConfigProvider.supportsDynamicTheme == true && dynamicColor == false)
|
||||
) Padding(
|
||||
padding: const EdgeInsets.only(bottom: 8, left: 16, right: 16),
|
||||
child: Scrollbar(
|
||||
controller: _colorsScrollController,
|
||||
|
@ -207,15 +210,6 @@ class _CustomizationWidgetState extends State<CustomizationWidget> {
|
|||
),
|
||||
),
|
||||
),
|
||||
CustomSwitchListTile(
|
||||
value: useThemeColorInsteadGreenRed,
|
||||
onChanged: (value) {
|
||||
setState(() => useThemeColorInsteadGreenRed = value);
|
||||
appConfigProvider.setUseThemeColorForStatus(value);
|
||||
},
|
||||
title: AppLocalizations.of(context)!.useThemeColorStatus,
|
||||
subtitle: AppLocalizations.of(context)!.useThemeColorStatusDescription,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue