StreamSwitchStyle class

Visual styling properties for switches.

Defines the appearance of switches including track, thumb, overlay, and outline colors. Color properties are WidgetStateProperty-based for state-dependent styling (default, hover, pressed, disabled, selected).

See also:

Annotations

Constructors

StreamSwitchStyle({WidgetStateProperty<Color?>? trackColor, WidgetStateProperty<Color?>? thumbColor, WidgetStateProperty<Color?>? trackOutlineColor, WidgetStateProperty<double?>? trackOutlineWidth, WidgetStateProperty<Color?>? overlayColor})
Creates switch style properties.
const
StreamSwitchStyle.from({Color? trackColor, Color? selectedTrackColor, Color? disabledTrackColor, Color? thumbColor, Color? selectedThumbColor, Color? disabledThumbColor, Color? trackOutlineColor, Color? selectedTrackOutlineColor, Color? disabledTrackOutlineColor, double? trackOutlineWidth, double? selectedTrackOutlineWidth, double? disabledTrackOutlineWidth, Color? overlayColor, Color? hoveredOverlayColor, Color? pressedOverlayColor})
Creates a StreamSwitchStyle from simple values.
factory

Properties

canMerge bool
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
overlayColor WidgetStateProperty<Color?>?
The overlay color for interaction feedback, resolved per WidgetState.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
thumbColor WidgetStateProperty<Color?>?
The color of the switch thumb (knob), resolved per WidgetState.
final
trackColor WidgetStateProperty<Color?>?
The color of the switch track, resolved per WidgetState.
final
trackOutlineColor WidgetStateProperty<Color?>?
The outline color of the switch track, resolved per WidgetState.
final
trackOutlineWidth WidgetStateProperty<double?>?
The outline width of the switch track, resolved per WidgetState.
final

Methods

copyWith({WidgetStateProperty<Color?>? trackColor, WidgetStateProperty<Color?>? thumbColor, WidgetStateProperty<Color?>? trackOutlineColor, WidgetStateProperty<double?>? trackOutlineWidth, WidgetStateProperty<Color?>? overlayColor}) StreamSwitchStyle
inherited
merge(StreamSwitchStyle? other) StreamSwitchStyle
inherited
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

lerp(StreamSwitchStyle? a, StreamSwitchStyle? b, double t) StreamSwitchStyle?
Linearly interpolate between two StreamSwitchStyle objects.