isDarkMode function
Implementation
bool isDarkMode([BuildContext? context]) {
if (context != null) {
return Theme.of(context).brightness == Brightness.dark;
}
return PlatformDispatcher.instance.platformBrightness == Brightness.dark;
}
bool isDarkMode([BuildContext? context]) {
if (context != null) {
return Theme.of(context).brightness == Brightness.dark;
}
return PlatformDispatcher.instance.platformBrightness == Brightness.dark;
}