isDarkMode property

bool get isDarkMode

Returns true if the current theme is dark.

Implementation

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