FlexSchemeSurfaceColors class
Immutable data class used to make the six different surface colors in a FlexColorScheme.
FlexSchemeSurfaceColors is used primarily via the
FlexSchemeSurfaceColors.blend factory. Before version 4.0 the
FlexSchemeSurfaceColors.from
factory was used.
Included colors are surface and inverseSurface plus plus blended surface colors for scaffoldBackground and dialogBackground, which are not a part of Flutter's standard ColorScheme.
This class, and its factory are only used by the FlexColorScheme.light and FlexColorScheme.dark factories. You normally do not have to use it, unless you are making a customized version of FlexColorScheme or similar feature, or if you want to, you can use it for getting surface colors for a standard ColorScheme.
- Mixed-in types
- Annotations
Constructors
- FlexSchemeSurfaceColors({required Color surface, Color? surfaceDim, Color? surfaceBright, Color? surfaceContainerLowest, Color? surfaceContainerLow, Color? surfaceContainer, Color? surfaceContainerHigh, Color? surfaceContainerHighest, Color? inverseSurface, required Color scaffoldBackground, required Color dialogBackground, @Deprecated('This color was deprecated in FCS 8.0 because Flutter 3.22 ' 'deprecated the color. ' 'It no longer has any function in FCS v8 and will be removed in v9.') Color? surfaceVariant, @Deprecated('This color was deprecated in FCS 8.0 because Flutter 3.22 ' 'deprecated the color. ' 'It no longer has any function in FCS v8 and will be removed in v9.') Color? background})
-
Default constructor. FlexSchemeSurfaceColors is usually created with
the
FlexSchemeSurfaceColors.from
factory.const - FlexSchemeSurfaceColors.blend({Brightness brightness = Brightness.light, FlexSurfaceMode surfaceMode = FlexSurfaceMode.highBackgroundLowScaffold, int blendLevel = 0, int surfaceVariantBlendDivide = 1, FlexSchemeColor? schemeColors, FlexSchemeSurfaceColors? blendColors, FlexSchemeSurfaceColors? surfaceColors, FlexScaffoldBaseColor? scaffoldBaseColor, bool useMaterial3 = true})
-
Create nuanced surface colors using pre-defined behavior via enum
FlexSurfaceMode property
surfaceMode
or make totally custom color blended surfaces.factory
Properties
- background → Color?
-
A color that typically appears behind scrollable content.
final
- dialogBackground → Color
-
The color of dialog background.
final
- hashCode → int
-
Override for hashcode, dart.ui Jenkins based.
no setteroverride
- inverseSurface → Color
-
A surface color used for displaying the reverse of what’s seen in the
surrounding UI, for example in a SnackBar to bring attention to
an alert. Defaults to surface as fallback.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scaffoldBackground → Color
-
The color of the Scaffold background.
final
- surface → Color
-
The background color for widgets like Card and Dialog.
final
- surfaceBright → Color
-
A color variant of surface that can be used for differentiation against
a component using surface. Defaults to surface as fallback.
no setter
- surfaceContainer → Color
-
A color variant of surface that can be used for differentiation against
a component using surface. Defaults to surface as fallback.
no setter
- surfaceContainerHigh → Color
-
A color variant of surface that can be used for differentiation against
a component using surface. Defaults to surface as fallback.
no setter
- surfaceContainerHighest → Color
-
A color variant of surface that can be used for differentiation against
a component using surface. Defaults to surface as fallback.
no setter
- surfaceContainerLow → Color
-
A color variant of surface that can be used for differentiation against
a component using surface. Defaults to surface as fallback.
no setter
- surfaceContainerLowest → Color
-
A color variant of surface that can be used for differentiation against
a component using surface. Defaults to surface as fallback.
no setter
- surfaceDim → Color
-
A color variant of surface that can be used for differentiation against
a component using surface. Defaults to surface as fallback.
no setter
- surfaceVariant → Color?
-
A color variant of surface that can be used for differentiation against
a component using surface. Defaults to surface as fallback.
final
Methods
-
copyWith(
{Color? surface, Color? surfaceDim, Color? surfaceBright, Color? surfaceContainerLowest, Color? surfaceContainerLow, Color? surfaceContainer, Color? surfaceContainerHigh, Color? surfaceContainerHighest, Color? inverseSurface, Color? scaffoldBackground, Color? dialogBackground, Color? surfaceVariant, Color? background}) → FlexSchemeSurfaceColors - Copy the object with one or more provided properties changed.
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Flutter debug properties override, includes toString.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringShort(
) → String -
A brief description of this object, usually just the runtimeType and the
hashCode.
inherited
Operators
-
operator ==(
Object other) → bool -
Override the equality operator.
override