FlexSchemeSurfaceColors class

Immutable data class used to make the three different surface colors in a FlexColorScheme.

FlexSchemeSurfaceColors is used primarily via the FlexSchemeSurfaceColors.from factory that returns FlexSchemeSurfaceColors object with defined surface colors based on enum property FlexSurface and Brightness. Included colors are surface and background, plus an own surface color for scaffoldBackground, which is 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 background, required Color scaffoldBackground})
Default constructor. FlexSchemeSurfaceColors is usually created with the FlexSchemeSurfaceColors.from factory.
const
FlexSchemeSurfaceColors.from({Brightness brightness = Brightness.light, FlexSurface surfaceStyle = FlexSurface.material, Color? primary})
Returns the surface colors for given brightness and surfaceStyle values.
factory

Properties

background Color
A color that typically appears behind scrollable content.
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}) 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