isDarkMode property
bool
isDarkMode
If the ThemeData of the current BuildContext is dark
Implementation
bool get isDarkMode => theme.brightness == Brightness.dark;
If the ThemeData of the current BuildContext is dark
bool get isDarkMode => theme.brightness == Brightness.dark;