Created
January 13, 2020 08:14
-
-
Save ashishrawat2911/6023c8db181a3ff1935bcb60de314ead to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DarkThemeProvider with ChangeNotifier { | |
DarkThemePreference darkThemePreference = DarkThemePreference(); | |
bool _darkTheme = false; | |
bool get darkTheme => _darkTheme; | |
set darkTheme(bool value) { | |
_darkTheme = value; | |
darkThemePreference.setDarkTheme(value); | |
notifyListeners(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment