FlexFixedColorStyle enum
The style and method used to compute the fixed, fixedDim colors and their on colors in a ColorScheme using the palettes provided main light mode color.
The main color should always be the light theme's ColorScheme.primary, ColorScheme.secondary or ColorScheme.tertiary. This means that a dark mode theme needs to know what colors were used for the light mode colors for ColorScheme.primary, ColorScheme.secondary or ColorScheme.tertiary. It is not a strict requirement, but necessary if you want the fixed and fixedDim colors to follow the Material-3 guide's color system, where these colors are derived from the main light color palette color and have same computed color values in dark mode.
The two available options, offer different nuances for the fixed color and fixedDim color generation.
The computed computed is made with simpler color math and uses same principles as FlexSchemeColor.from does when not using seed generated ColorSchemes and it generates missing colors. This version may fit better with the computed and not seed generated ColorSchemes.
The seeded version is bit more expensive as it requires creating a seeded ColorScheme even when a seed generated ColorScheme is not being used. This version may in some cases produce visually more appealing results.
Values
- computed → const FlexFixedColorStyle
-
Compute colors that are fixed color based on the main color.
The computation algorithm is equivalent to the ones used when providing only limited color value inputs to a FlexSchemeColor.from constructor. The result thus fits well when it is used together with FlexSchemeColor.from.
- seeded → const FlexFixedColorStyle
-
Seed generate the fixed colors, even when a seeded ColorScheme is not used.
Use a SeedColorScheme.fromSeeds to generate the fixed and fixedDim colors and their on colors.
The FlexSchemeVariant.chroma is used for the seed generation, as it best matches the chromacity of target input color.
- seededHighContrast → const FlexFixedColorStyle
-
Seed generate the fixed colors, even when a seeded ColorScheme is not used.
Use a SeedColorScheme.fromSeeds to generate the fixed and fixedDim colors and their on colors.
The FlexSchemeVariant.chroma is used for the seed generation, as it best matches the chromacity of target input color.
Additionally the FlexTones modifier FlexTones.higherContrastFixed is applied.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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
Constants
-
values
→ const List<
FlexFixedColorStyle> - A constant List of the values in this enum, in order of their declaration.