isDarkMode property

bool isDarkMode

If the ThemeData of the current BuildContext is dark

Implementation

bool get isDarkMode => theme.brightness == Brightness.dark;