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, required bool isDark, required TonalPalette primaryPalette, required TonalPalette secondaryPalette, required TonalPalette tertiaryPalette, required TonalPalette neutralPalette, required TonalPalette neutralVariantPalette})
Properties
- 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
- errorPalette → TonalPalette
-
Given a tone, produces a reddish, colorful, color.
final
- hashCode → int
-
The hash code for this object.
read-onlyinherited
- 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
- 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
- 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
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
- 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
- sourceColorArgb → int
-
The source color of the theme as an ARGB integer.
final
- sourceColorHct → Hct
-
The source color of the theme in HCT.
final
- 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
- variant → Variant
-
The variant, or style, of the theme.
final
Methods
-
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