DynamicScheme class
Constructed by a set of values representing the current UI state (such as whether or not its dark theme, what the theme style is, etc.), and provides a set of TonalPalettes that can create colors that fit in with the theme style. Used by DynamicColor to resolve into a color.
Constructors
- DynamicScheme({required int sourceColorArgb, required Variant variant, double contrastLevel = 0.0, bool useExpressiveOnContainerColors = false, required bool isDark, required TonalPalette primaryPalette, required TonalPalette secondaryPalette, required TonalPalette tertiaryPalette, required TonalPalette neutralPalette, required TonalPalette neutralVariantPalette, TonalPalette? customErrorPalette})
- Primary constructor for DynamicScheme.
Properties
- background → int
-
The background color of the theme.
no setter
- contrastLevel → double
-
Value from -1 to 1. -1 represents minimum contrast, 0 represents
standard (i.e. the design as spec'd), and 1 represents maximum contrast.
final
- error → int
-
The error color of the theme.
no setter
- errorContainer → int
-
The errorContainer color of the theme.
no setter
- errorPalette → TonalPalette
-
Given a tone, produces a reddish, colorful, color.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- inverseOnSurface → int
-
The inverseOnSurface color of the theme.
no setter
- inversePrimary → int
-
The inversePrimary color of the theme.
no setter
- inverseSurface → int
-
The inverseSurface color of the theme.
no setter
- isDark → bool
-
Whether or not the scheme is in 'dark mode' or 'light mode'.
final
- neutralPalette → TonalPalette
-
Given a tone, produces a color. Hue and chroma of the color are specified
in the design specification of the variant. Usually not colorful at all,
intended for background & surface colors.
final
- neutralPaletteKeyColor → int
-
The neutralPaletteKeyColor color of the theme.
no setter
- neutralVariantPalette → TonalPalette
-
Given a tone, produces a color. Hue and chroma of the color are specified
in the design specification of the variant. Usually not colorful, but
slightly more colorful than Neutral. Intended for backgrounds & surfaces.
final
- neutralVariantPaletteKeyColor → int
-
The neutralVariantPaletteKeyColor variant color of the theme.
no setter
- onBackground → int
-
The onBackground color of the theme.
no setter
- onError → int
-
The onError color of the theme.
no setter
- onErrorContainer → int
-
The onErrorContainer color of the theme.
no setter
- onPrimary → int
-
The onPrimary color of the theme.
no setter
- onPrimaryContainer → int
-
The onPrimaryContainer color of the theme.
no setter
- onPrimaryFixed → int
-
The onPrimaryFixed color of the theme.
no setter
- onPrimaryFixedVariant → int
-
The onPrimaryFixedVariant color of the theme.
no setter
- onSecondary → int
-
The onSecondary color of the theme.
no setter
- onSecondaryContainer → int
-
The onSecondaryContainer color of the theme.
no setter
- onSecondaryFixed → int
-
The onSecondaryFixed color of the theme.
no setter
- onSecondaryFixedVariant → int
-
The onSecondaryFixedVariant color of the theme.
no setter
- onSurface → int
-
The onSurface color of the theme.
no setter
- onSurfaceVariant → int
-
The onSurfaceVariant color of the theme.
no setter
- onTertiary → int
-
The onTertiary color of the theme.
no setter
- onTertiaryContainer → int
-
The onTertiaryContainer color of the theme.
no setter
- onTertiaryFixed → int
-
The onTertiaryFixed color of the theme.
no setter
- onTertiaryFixedVariant → int
-
The onTertiaryFixedVariant color of the theme.
no setter
- outline → int
-
The inverseSurfaceVariant color of the theme.
no setter
- outlineVariant → int
-
The outlineVariant color of the theme.
no setter
- primary → int
-
The primary color of the theme.
no setter
- primaryContainer → int
-
The primaryContainer color of the theme.
no setter
- primaryFixed → int
-
The primaryFixed color of the theme.
no setter
- primaryFixedDim → int
-
The primaryFixedDim color of the theme.
no setter
- primaryPalette → TonalPalette
-
Given a tone, produces a color. Hue and chroma of the color are specified
in the design specification of the variant. Usually colorful.
final
- primaryPaletteKeyColor → int
-
The primaryPaletteKeyColor color of the theme.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrim → int
-
The scrim color of the theme.
no setter
- secondary → int
-
The secondary color of the theme.
no setter
- secondaryContainer → int
-
The secondaryContainer color of the theme.
no setter
- secondaryFixed → int
-
The secondaryFixed color of the theme.
no setter
- secondaryFixedDim → int
-
The secondaryFixedDim color of the theme.
no setter
- secondaryPalette → TonalPalette
-
Given a tone, produces a color. Hue and chroma of the color are specified
in the design specification of the variant. Usually less colorful.
final
- secondaryPaletteKeyColor → int
-
The secondaryPaletteKeyColor color of the theme.
no setter
- shadow → int
-
The shadow color of the theme.
no setter
- sourceColorArgb → int
-
The source color of the theme as an ARGB integer.
final
- sourceColorHct → Hct
-
The source color of the theme in HCT.
final
- surface → int
-
The surface color of the theme.
no setter
- surfaceBright → int
-
The surfaceBright color of the theme.
no setter
- surfaceContainer → int
-
The surfaceContainer color of the theme.
no setter
- surfaceContainerHigh → int
-
The surfaceContainerHigh color of the theme.
no setter
- surfaceContainerHighest → int
-
The surfaceContainerHighest color of the theme.
no setter
- surfaceContainerLow → int
-
The surfaceContainerLow color of the theme.
no setter
- surfaceContainerLowest → int
-
The surfaceContainerLowest color of the theme.
no setter
- surfaceDim → int
-
The surfaceDim color of the theme.
no setter
- surfaceTint → int
-
The surfaceTint color of the theme.
no setter
- surfaceVariant → int
-
The surfaceVariant color of the theme.
no setter
- tertiary → int
-
The tertiary color of the theme.
no setter
- tertiaryContainer → int
-
The tertiaryContainer color of the theme.
no setter
- tertiaryFixed → int
-
The tertiaryFixed color of the theme.
no setter
- tertiaryFixedDim → int
-
The tertiaryFixedDim color of the theme.
no setter
- tertiaryPalette → TonalPalette
-
Given a tone, produces a color. Hue and chroma of the color are specified
in the design specification of the variant. Usually a different hue from
primary and colorful.
final
- tertiaryPaletteKeyColor → int
-
The tertiaryPaletteKeyColor color of the theme.
no setter
- useExpressiveOnContainerColors → bool
-
Use expressive on container colors for light mode.
final
- variant → Variant
-
The variant, or style, of the theme.
final
Methods
-
getArgb(
DynamicColor dynamicColor) → int - Get the int ARGB color of the DynamicColor.
-
getHct(
DynamicColor dynamicColor) → Hct - Get the HCT color of the DynamicColor.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited