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.

Implementers

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

background int
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
no setter
errorContainer int
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
no setter
inversePrimary int
no setter
inverseSurface int
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
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
no setter
onBackground int
no setter
onError int
no setter
onErrorContainer int
no setter
onPrimary int
no setter
onPrimaryContainer int
no setter
onPrimaryFixed int
no setter
onPrimaryFixedVariant int
no setter
onSecondary int
no setter
onSecondaryContainer int
no setter
onSecondaryFixed int
no setter
onSecondaryFixedVariant int
no setter
onSurface int
no setter
onSurfaceVariant int
no setter
onTertiary int
no setter
onTertiaryContainer int
no setter
onTertiaryFixed int
no setter
onTertiaryFixedVariant int
no setter
outline int
no setter
outlineVariant int
no setter
primary int
no setter
primaryContainer int
no setter
primaryFixed int
no setter
primaryFixedDim int
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
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrim int
no setter
secondary int
no setter
secondaryContainer int
no setter
secondaryFixed int
no setter
secondaryFixedDim int
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
no setter
shadow int
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
no setter
surfaceBright int
no setter
surfaceContainer int
no setter
surfaceContainerHigh int
no setter
surfaceContainerHighest int
no setter
surfaceContainerLow int
no setter
surfaceContainerLowest int
no setter
surfaceDim int
no setter
surfaceTint int
no setter
surfaceVariant int
no setter
tertiary int
no setter
tertiaryContainer int
no setter
tertiaryFixed int
no setter
tertiaryFixedDim int
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
no setter
variant Variant
The variant, or style, of the theme.
final

Methods

getArgb(DynamicColor dynamicColor) int
getHct(DynamicColor dynamicColor) Hct
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

Static Methods

getRotatedHue(Hct sourceColor, List<double> hues, List<double> rotations) double