activeTheme property
Theme
activeTheme
Returns the Theme
configured for the specified colorScheme, or the default theme if none is specified or the specified
color scheme does not exist.
If a dark theme has been defined and a color scheme of .dark
is requested, the dark theme will be returned instead of the
default theme.
- Parameter colorScheme: The color scheme for which to retrieve the theme. If null, the default theme is returned.
- Returns: The
Theme
configured for the specified color scheme, or the default theme if none is specified or the specified color scheme does not exist.
Implementation
tiki_theme.Theme get activeTheme {
var brightness =
SchedulerBinding.instance.platformDispatcher.platformBrightness;
return brightness == Brightness.dark && _dark != null ? dark : theme;
}