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, surfaceVariant, inverseSurface 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, Color? surfaceVariant, Color? inverseSurface, 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, int surfaceVariantBlendDivide = 1, 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

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
surfaceVariant Color
A color variant of surface that can be used for differentiation against a component using surface. Defaults to surface as fallback.
no setter

Methods

copyWith({Color? surface, Color? surfaceVariant, Color? inverseSurface, Color? background, Color? scaffoldBackground, Color? dialogBackground}) 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