SwitchToken class

Every field is an override; a null one falls back to the value derived from the global theme. Supply one globally through ThemeData(components: ComponentsConfig(switchToken: SwitchToken(...))), or per instance via Switch.token.

Annotations

Constructors

SwitchToken({double? trackHeight, double? trackHeightSM, double? trackHeightLG, double? trackMinWidth, double? trackMinWidthSM, double? handleSize, double? handleSizeSM, List<BoxShadow>? handleShadow, Color? colorPrimary, Color? colorBg, Color? handleBg})
Creates a SwitchToken.
const

Properties

colorBg → Color?
Inactive track background color (colorBg).
final
colorPrimary → Color?
Primary active track color (colorPrimary).
final
handleBg → Color?
The fill of the handle that slides along the track.
final
handleShadow → List<BoxShadow>?
What the handle casts on the track (handleShadow).
final
handleSize → double?
Size of default switch handle (handleSize).
final
handleSizeSM → double?
Size of small switch handle (handleSizeSM).
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
trackHeight → double?
Height of default switch track (trackHeight).
final
trackHeightLG → double?
Height of large switch track (trackHeightLG).
final
trackHeightSM → double?
Height of small switch track (trackHeightSM).
final
trackMinWidth → double?
Min width of default switch track (trackMinWidth).
final
trackMinWidthSM → double?
Min width of small switch track (trackMinWidthSM).
final

Methods

merge(SwitchToken other) → SwitchToken
This one with other's fields laid over it, one field at a time.
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