Created
January 30, 2023 08:47
-
-
Save RahmiTufanoglu/c0019a1547a7ebcebe7ffd229cf565fe to your computer and use it in GitHub Desktop.
DarkMode
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
extension DarkMode on BuildContext { | |
bool get isDarkMode { | |
final brightness = MediaQuery.of(this).platformBrightness; | |
return brightness == Brightness.dark; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment