effectiveBrightness property

Brightness get effectiveBrightness

Get the effective brightness based on current theme mode If theme mode is system, returns current system brightness Otherwise returns the brightness corresponding to the selected theme mode

Implementation

Brightness get effectiveBrightness {
  if (_currentThemeMode == ThemeMode.system) {
    return _currentSystemBrightness;
  }
  return _currentThemeMode == ThemeMode.dark
      ? Brightness.dark
      : Brightness.light;
}