brightness property

Brightness brightness

Gets the brightness setting for the current theme.

If the theme mode is set to 'system', it will return the brightness that ties with the device's system theme setting. If the theme mode is set to 'light', it always returns Brightness.light. If neither, it returns Brightness.dark by default (i.e., when the theme mode is 'dark').

Implementation

Brightness get brightness {
  if (themeMode == ThemeMode.system) {
    return _mediaBrightness; // Return the current system brightness setting
  } else if (themeMode == ThemeMode.light) {
    return Brightness.light; // Return the light mode brightness
  } else {
    return Brightness.dark; // Default: Return the dark mode brightness
  }
}