CupertinoSwitchData class final

Cupertino-specific configuration for a switch widget.

Extends PlatformSwitchData with Cupertino-only properties.

Inheritance

Constructors

CupertinoSwitchData({bool? value, ValueChanged<bool>? onChanged, Key? widgetKey, bool isEnabled = true, Color? activeThumbColor, Color? activeTrackColor, Color? inactiveThumbColor, Color? inactiveTrackColor, Color? focusColor, ImageProvider<Object>? activeThumbImage, ImageErrorListener? onActiveThumbImageError, ImageProvider<Object>? inactiveThumbImage, ImageErrorListener? onInactiveThumbImageError, WidgetStateProperty<Color?>? trackOutlineColor, WidgetStateProperty<double?>? trackOutlineWidth, WidgetStateProperty<Icon?>? thumbIcon, DragStartBehavior dragStartBehavior = kDefaultDragStartBehavior, WidgetStateProperty<MouseCursor>? mouseCursor, FocusNode? focusNode, ValueChanged<bool>? onFocusChange, bool autofocus = kDefaultAutofocus, bool? applyTheme, Color? onLabelColor, Color? offLabelColor})
isEnabled is a convenience property for setting onChanged == null automatically. activeThumbColor is synonymous with thumbColor property of CupertinoSwitch.
const

Properties

activeThumbColor Color?
Color of the thumb when the switch is active.
finalinherited
activeThumbImage ImageProvider<Object>?
Image displayed on the thumb when the switch is active.
finalinherited
activeTrackColor Color?
Color of the track when the switch is active.
finalinherited
applyTheme bool?
Whether to apply the Cupertino theme to the switch.
final
autofocus bool
Whether the switch should autofocus.
finalinherited
dragStartBehavior DragStartBehavior
Drag start behavior for the switch.
finalinherited
focusColor Color?
Color of the switch when focused.
finalinherited
focusNode FocusNode?
Focus node for the switch.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
inactiveThumbColor Color?
Color of the thumb when the switch is inactive.
finalinherited
inactiveThumbImage ImageProvider<Object>?
Image displayed on the thumb when the switch is inactive.
finalinherited
inactiveTrackColor Color?
Color of the track when the switch is inactive.
finalinherited
isEnabled bool
Whether the switch is enabled.
finalinherited
mouseCursor WidgetStateProperty<MouseCursor>?
Mouse cursor as a WidgetStateProperty.
finalinherited
offLabelColor Color?
Color of the "off" label.
final
onActiveThumbImageError ImageErrorListener?
Error listener for the active thumb image.
finalinherited
onChanged ValueChanged<bool>?
Callback when the switch value changes.
finalinherited
onFocusChange ValueChanged<bool>?
Callback when the focus state changes.
finalinherited
onInactiveThumbImageError ImageErrorListener?
Error listener for the inactive thumb image.
finalinherited
onLabelColor Color?
Color of the "on" label.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
thumbIcon WidgetStateProperty<Icon?>?
Thumb icon as a WidgetStateProperty.
finalinherited
trackOutlineColor WidgetStateProperty<Color?>?
Track outline color as a WidgetStateProperty.
finalinherited
trackOutlineWidth WidgetStateProperty<double?>?
Track outline width as a WidgetStateProperty.
finalinherited
value bool?
Current value of the switch.
finalinherited
widgetKey Key?
Key applied to the underlying platform widget.
finalinherited

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