1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2025-06-19 00:05:16 +00:00

Can toggle dark mode from menu on tablet mode

This commit is contained in:
2020-05-12 19:27:23 +02:00
parent fe3f0c0e85
commit 70e3efc93d
3 changed files with 27 additions and 2 deletions

View File

@ -76,6 +76,12 @@ class PreferencesHelper {
ApplicationPreferences get preferences => ApplicationPreferences(
enableDarkMode: getBool(PreferencesKeyList.ENABLE_DARK_THEME),
);
/// Apply new preferences
Future<void> setPreferences(ApplicationPreferences preferences) async {
await setBool(
PreferencesKeyList.ENABLE_DARK_THEME, preferences.enableDarkMode);
}
}
PreferencesHelper preferences() {