SafaehStatusColors class

Optional theme extension that overrides the semantic status colors.

SafaehSemanticStatus derives success, warning and danger from the ColorScheme (success is primary). A host whose primary color is not its "positive" color can register this extension on ThemeData.extensions and read it through SafaehStatusColors.of. Without the extension of returns the same values as the ColorScheme getters, so existing hosts are unaffected.

Annotations

Constructors

SafaehStatusColors({required Color success, required Color onSuccess, required Color warning, required Color onWarning, required Color danger, required Color onDanger})
const
SafaehStatusColors.fromColorScheme(ColorScheme scheme)
The values SafaehSemanticStatus derives from scheme.
factory

Properties

danger → Color
final
hashCode → int
The hash code for this object.
no setterinherited
onDanger → Color
final
onSuccess → Color
final
onWarning → Color
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
success → Color
final
type → Object
The extension's type.
no setterinherited
warning → Color
final

Methods

copyWith({Color? success, Color? onSuccess, Color? warning, Color? onWarning, Color? danger, Color? onDanger}) → SafaehStatusColors
Creates a copy of this theme extension with the given fields replaced by the non-null parameter values.
lerp(covariant SafaehStatusColors? other, double t) → SafaehStatusColors
Linearly interpolate with another ThemeExtension object.
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

Static Methods

of(BuildContext context) → SafaehStatusColors
The registered extension, or colors derived from the current scheme.