FlexSchemeSurfaceColors class
Immutable data class used to make the four 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 background, 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, required Color dialogBackground, required Color background, required Color scaffoldBackground})
-
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, FlexSchemeColor? schemeColors, FlexSchemeSurfaceColors? blendColors, FlexSchemeSurfaceColors? surfaceColors})
-
Create nuanced surface colors using pre-defined behavior via enum
FlexSurfaceMode property
surfaceMode
or make totally custom color blended surfaces.factory - FlexSchemeSurfaceColors.from({Brightness brightness = Brightness.light, FlexSurface surfaceStyle = FlexSurface.material, Color? primary})
-
Returns the surface colors for given
brightness
andsurfaceStyle
values.factory
Properties
- background → Color
-
A color that typically appears behind scrollable content.
final
- dialogBackground → Color
-
The color of dialog background.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- 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
Methods
-
copyWith(
{Color? surface, Color? background, Color? scaffoldBackground, Color? dialogBackground}) → FlexSchemeSurfaceColors - Copy the object with one or more provided properties changed.
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
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 -
The equality operator.
override