RSwitchResolvedTokens class final

Resolved visual tokens for switch rendering.

Annotations

Constructors

RSwitchResolvedTokens({required Size trackSize, required BorderRadius trackBorderRadius, required Color trackOutlineColor, required double trackOutlineWidth, required Color activeTrackColor, required Color inactiveTrackColor, required Size thumbSizeUnselected, required Size thumbSizeSelected, required Size thumbSizePressed, required Size thumbSizeTransition, required Color activeThumbColor, required Color inactiveThumbColor, required double thumbPadding, required double disabledOpacity, required Color pressOverlayColor, required double pressOpacity, required Size minTapTargetSize, required double stateLayerRadius, required WidgetStateProperty<Color?> stateLayerColor, WidgetStateProperty<Icon?>? thumbIcon, RSwitchMotionTokens? motion})
const

Properties

activeThumbColor Color
Thumb color when switch is on.
final
activeTrackColor Color
Track color when switch is on.
final
disabledOpacity double
Opacity applied when disabled (0.0-1.0).
final
hashCode int
The hash code for this object.
no setteroverride
inactiveThumbColor Color
Thumb color when switch is off.
final
inactiveTrackColor Color
Track color when switch is off.
final
minTapTargetSize Size
Minimum tap target size.
final
motion RSwitchMotionTokens?
Motion tokens for visual transitions.
final
pressOpacity double
Opacity for pressed feedback (Cupertino-style).
final
pressOverlayColor Color
Overlay color for press feedback (Material-style).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stateLayerColor WidgetStateProperty<Color?>
State layer color as WidgetStateProperty. Resolves to primary (selected) or onSurface (unselected) with opacity.
final
stateLayerRadius double
Radius of the state layer (radial reaction) around thumb. Material 3: 20.0 px
final
thumbIcon WidgetStateProperty<Icon?>?
Optional icon displayed on the thumb.
final
thumbPadding double
Padding between thumb and track edge during drag.
final
thumbSizePressed Size
Thumb size when pressed or dragging. Material 3: Size(28, 28)
final
thumbSizeSelected Size
Thumb size when switch is ON (selected). Material 3: Size(24, 24)
final
thumbSizeTransition Size
Transitional thumb size during toggle animation (stretched phase). Material 3: Size(34, 22)
final
thumbSizeUnselected Size
Thumb size when switch is OFF (unselected). Material 3: Size(16, 16)
final
trackBorderRadius BorderRadius
Corner radius for the track.
final
trackOutlineColor Color
Outline color for the track.
final
trackOutlineWidth double
Outline width for the track.
final
trackSize Size
Size of the track (background).
final

Methods

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.
override