Night mary in the dark free download for android

broken image
broken image

_mode = _mode = ThemeMode.light ? ThemeMode.dark : ThemeMode.light Ĭurrent theme can be found using: bool isDarkMode = MediaQuery.of(context).platformBrightness = Brightness.dark

broken image
broken image

Static void saveData(String key, dynamic value) async ) : _mode = mode StorageManager.dart import 'package:shared_preferences/shared_preferences.dart' You can easily store your theme preference in form of a string and then at the start of your app check if there is value stored on file system, if so apply that theme as shown below. By following this procedure you can save your theme so the user doesn't have to switch theme every time. The easiest way in my opinion is by using provider to manage the state of your app and shared_preferences to save your theme preference on file system.