DynamicScheme class

Provides important settings for creating colors dynamically, and 6 color palettes.

Requires:

  1. A color. (source color)
  2. A theme. (Variant)
  3. Whether or not its dark mode.
  4. Contrast level. (-1 to 1, currently contrast ratio 3.0 and 7.0)
Available extensions

Constructors

DynamicScheme({required TonalPaletteSourceColor sourceColor, required Variant variant, required bool isDark, double contrastLevel = 0.0, Platform platform = defaultPlatform, SpecVersion specVersion = defaultSpecVersion, required TonalPalette primaryPalette, required TonalPalette secondaryPalette, required TonalPalette tertiaryPalette, required TonalPalette neutralPalette, required TonalPalette neutralVariantPalette, required TonalPalette errorPalette})
DynamicScheme.raw({required TonalPaletteSourceColor sourceColor, required Variant variant, required bool isDark, required double contrastLevel, required Platform platform, required SpecVersion specVersion, required TonalPalette primaryPalette, required TonalPalette secondaryPalette, required TonalPalette tertiaryPalette, required TonalPalette neutralPalette, required TonalPalette neutralVariantPalette, required TonalPalette errorPalette})
const
DynamicScheme.withDefaults({TonalPaletteSourceColor? sourceColor, Variant? variant, bool? isDark, double? contrastLevel, Platform? platform, SpecVersion? specVersion, TonalPalette? primaryPalette, TonalPalette? secondaryPalette, TonalPalette? tertiaryPalette, TonalPalette? neutralPalette, TonalPalette? neutralVariantPalette, TonalPalette? errorPalette})

Properties

background int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

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
controlActivated int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
controlHighlight int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
controlNormal int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
error int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
errorContainer int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
errorDim int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
errorPalette TonalPalette
final
errorPaletteKeyColor int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
hashCode int
The hash code for this object.
no setteroverride
inverseOnSurface int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
inversePrimary int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
inverseSurface int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
isDark bool
Whether or not the scheme is dark mode.
final
neutralPalette TonalPalette
final
neutralPaletteKeyColor int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
neutralVariantPalette TonalPalette
final
neutralVariantPaletteKeyColor int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
onBackground int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
onError int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
onErrorContainer int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
onPrimary int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
onPrimaryContainer int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
onPrimaryFixed int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
onPrimaryFixedVariant int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
onSecondary int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
onSecondaryContainer int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
onSecondaryFixed int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
onSecondaryFixedVariant int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
onSurface int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
onSurfaceVariant int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
onTertiary int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
onTertiaryContainer int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
onTertiaryFixed int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
onTertiaryFixedVariant int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
outline int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
outlineVariant int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
platform Platform
The platform on which this scheme is intended to be used.
final
primary int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
primaryContainer int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
primaryDim int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
primaryFixed int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
primaryFixedDim int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
primaryPalette TonalPalette
final
primaryPaletteKeyColor int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrim int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
secondary int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
secondaryContainer int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
secondaryDim int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
secondaryFixed int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
secondaryFixedDim int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
secondaryPalette TonalPalette
final
secondaryPaletteKeyColor int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
shadow int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
sourceColor TonalPaletteSourceColor
The source color of the scheme.
final
sourceColorArgb int
The source color of the scheme in ARGB format.
no setter
sourceColorHct Hct
The source color of the scheme in HCT format.
no setter
sourceColorHctList List<Hct>
The source color of the scheme in HCT format.
no setter
specVersion SpecVersion
The spec version of the scheme.
final
surface int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
surfaceBright int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
surfaceContainer int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
surfaceContainerHigh int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
surfaceContainerHighest int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
surfaceContainerLow int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
surfaceContainerLowest int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
surfaceDim int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
surfaceTint int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
surfaceVariant int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
tertiary int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
tertiaryContainer int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
tertiaryDim int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
tertiaryFixed int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
tertiaryFixedDim int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
tertiaryPalette TonalPalette
final
tertiaryPaletteKeyColor int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
textHintInverse int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
textPrimaryInverse int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
textPrimaryInverseDisableOnly int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
textSecondaryAndTertiaryInverse int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
textSecondaryAndTertiaryInverseDisabled int

Available on DynamicScheme, provided by the MaterialDynamicSchemeColorsExtension extension

no setter
variant Variant
The variant of the scheme.
final

Methods

copyWith({TonalPaletteSourceColor? sourceColor, Variant? variant, bool? isDark, double? contrastLevel, Platform? platform, SpecVersion? specVersion, TonalPalette? primaryPalette, TonalPalette? secondaryPalette, TonalPalette? tertiaryPalette, TonalPalette? neutralPalette, TonalPalette? neutralVariantPalette, TonalPalette? errorPalette}) DynamicScheme
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.
override

Operators

operator ==(Object other) bool
The equality operator.
override

Static Methods

getPiecewiseValue(Hct sourceColorHct, List<double> hueBreakpoints, List<double> hues) double
getRotatedHue(Hct sourceColorHct, List<double> hueBreakpoints, List<double> rotations) double

Constants

defaultPlatform → const Platform
defaultSpecVersion → const SpecVersion