SchemeColor enum

Enum used to described which color from the active theme's ColorScheme should be used by certain widget sub-themes.

This enum can be used for quick color scheme based customization of sub-themes for:

It can be used when opting in on opinionated sub-themes. The opinionated sub-theme for these widgets have one or more properties called nnnSchemeColor where nnn describes the color feature that can be set to a none standard ColorScheme based color. If not set the property is null and the default ColorScheme based color behavior of the opinionated sub-theme will be used. This may differ from the corresponding Widget's SDK default un-themed color behavior.

The enum selection primaryVariant and secondaryVariant colors might be best to avoid since they will deprecated in Flutter SDK soon and replaced with new Material 3 based color properties. All the new color properties in the new M3 based ColorScheme will be added when they reach the Flutter stable channel.

This enum to select and override default Widget colors when using opinionated sub-themes might be applied to more widgets in later release if so requested and desired. It should be noted though all will not be since you can still customize FlexColorScheme themes and its sub-themes totally ThemeData.copyWith methods.

Inheritance

Constructors

SchemeColor()
const

Values

primary → const SchemeColor

The active theme's color scheme primary color will be used.

onPrimary → const SchemeColor

The active theme's color scheme onPrimary color will be used.

primaryVariant → const SchemeColor

The active theme's color scheme primaryVariant color will be used.

secondary → const SchemeColor

The active theme's color scheme secondary color will be used.

onSecondary → const SchemeColor

The active theme's color scheme onSecondary color will be used.

secondaryVariant → const SchemeColor

The active theme's color scheme secondaryVariant color will be used.

surface → const SchemeColor

The active theme's color scheme surface color will be used.

onSurface → const SchemeColor

The active theme's color scheme onSurface color will be used.

background → const SchemeColor

The active theme's color scheme background color will be used.

onBackground → const SchemeColor

The active theme's color scheme onBackground color will be used.

error → const SchemeColor

The active theme's color scheme error color will be used.

onError → const SchemeColor

The active theme's color scheme onError color will be used.

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
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<SchemeColor>
A constant List of the values in this enum, in order of their declaration.