isDarkTheme property

  1. @override
bool get isDarkTheme
override

Wether the current mode is dark.

If the current ThemeMode is system, the darkness is calculated from the brightness of the system (MediaQuery.platformBrightnessOf).

Implementation

@override
bool get isDarkTheme {
  if (_themeMode == ThemeMode.system) {
    _isDarkTheme = _getSystemBrightness() == Brightness.dark;
  } else {
    _isDarkTheme = _themeMode == ThemeMode.dark;
  }
  ReactiveStatelessWidget.addToObs?.call(injected);
  return _isDarkTheme;
}