Closed xAshry closed 3 weeks ago
Hello @xAshry,
Go to packages/houzi_package/lib/files/theme_service_files/theme_notifier.dart
and look for ThemeNotifier._internal()
method and replace it with the following:
ThemeNotifier._internal(){
String themeMode = ThemeStorageManager.readData(THEME_MODE_INFO) ?? DARK_THEME_MODE;
if(themeMode == null || themeMode.isEmpty){
_themeMode = ThemeMode.dark;
// _themeMode = ThemeMode.system;
}else if (themeMode == LIGHT_THEME_MODE) {
_themeMode = ThemeMode.light;
} else if (themeMode == DARK_THEME_MODE){
_themeMode = ThemeMode.dark;
} else if (themeMode == SYSTEM_THEME_MODE){
_themeMode = ThemeMode.system;
}
notifyListeners();
}
Then go to packages/houzi_package/lib/pages/app_settings_pages/dark_mode_setting.dart
and look for void initState()
method and replace the 23 line with:
String themeMode = ThemeStorageManager.readData(THEME_MODE_INFO) ?? DARK_THEME_MODE;
wow, that's a bit of codes :) can you have it like the language default in the constant.dart file in lib/common ? default "Dark" or "light" something like that like the "en" or "fr" etc .. till the next update we screw it up again .. :)
@quitriz Thank you for your suggestion. We will consider it.
@quitriz Thank you for your suggestion. We will consider it.
NP Hassan, when do is it planned for the next updates is comming out ? just waiting for the moderation functions to be implemented. I really need those functions.
Thanks
@MuhammadSulemanSaleem we should have a hook for the dark mode or light mode.
Added support of hook for the dark mode or light mode i.e. getDefaultAppThemeModeHook()
in Houzi 1.4.2.
Hello ,, i want to enable the dark theme by default instead of lite theme ,, where i can find the variable code to change it to dark ? thank you