ContextThemeExtensions extension

Extensions for accessing theme properties from BuildContext.

Example:

ColorScheme scheme = context.colorScheme;
on

Properties

colorScheme → ColorScheme

Available on BuildContext, provided by the ContextThemeExtensions extension

The color scheme from the current theme.
no setter
errorColor → Color

Available on BuildContext, provided by the ContextThemeExtensions extension

The error color from the color scheme.
no setter
inverseSurfaceColor → Color

Available on BuildContext, provided by the ContextThemeExtensions extension

The inverse surface color from the color scheme.
no setter
isDarkMode → bool

Available on BuildContext, provided by the ContextThemeExtensions extension

Returns true if the current theme is dark mode.
no setter
isLightMode → bool

Available on BuildContext, provided by the ContextThemeExtensions extension

Returns true if the current theme is light mode.
no setter
onBackgroundColor → Color

Available on BuildContext, provided by the ContextThemeExtensions extension

The onBackground color from the color scheme (deprecated in Flutter 3.18, use onSurfaceColor instead).
no setter
onErrorColor → Color

Available on BuildContext, provided by the ContextThemeExtensions extension

The onError color from the color scheme.
no setter
onPrimaryColor → Color

Available on BuildContext, provided by the ContextThemeExtensions extension

The onPrimary color from the color scheme.
no setter
onSecondaryColor → Color

Available on BuildContext, provided by the ContextThemeExtensions extension

The onSecondary color from the color scheme.
no setter
onSurfaceColor → Color

Available on BuildContext, provided by the ContextThemeExtensions extension

The onSurface color from the color scheme.
no setter
onTertiaryColor → Color

Available on BuildContext, provided by the ContextThemeExtensions extension

The onTertiary color from the color scheme.
no setter
outlineColor → Color

Available on BuildContext, provided by the ContextThemeExtensions extension

The outline color from the color scheme.
no setter
primaryColor → Color

Available on BuildContext, provided by the ContextThemeExtensions extension

The primary color from the color scheme.
no setter
scrimColor → Color

Available on BuildContext, provided by the ContextThemeExtensions extension

The scrim color from the color scheme.
no setter
secondaryColor → Color

Available on BuildContext, provided by the ContextThemeExtensions extension

The secondary color from the color scheme.
no setter
shadowColor → Color

Available on BuildContext, provided by the ContextThemeExtensions extension

The shadow color from the color scheme.
no setter
surfaceColor → Color

Available on BuildContext, provided by the ContextThemeExtensions extension

The surface color from the color scheme.
no setter
surfaceTintColor → Color

Available on BuildContext, provided by the ContextThemeExtensions extension

The surface tint color from the color scheme.
no setter
surfaceVariantColor → Color

Available on BuildContext, provided by the ContextThemeExtensions extension

The surface variant color from the color scheme (deprecated in Flutter 3.18, use surfaceTintColor or surfaceColor instead).
no setter
tertiaryColor → Color

Available on BuildContext, provided by the ContextThemeExtensions extension

The tertiary color from the color scheme.
no setter
textTheme → TextTheme

Available on BuildContext, provided by the ContextThemeExtensions extension

The text theme from the current theme.
no setter