Switch
A switch widget that can be toggled.
Import this type with “”
Type: boolean, default: false
The checked state of the switch.
thumbOffColor
Type:
The color of the movable thumb, when switched off.
thumbOnColor
Type:
The color of the movable thumb, when switched on.
Type: Color
The color of the track that holds the thumb, when switched off.
trackOnColor
The color of the track that holds the thumb, when switched on.
checkedChanged
Fired when the property has changed.
Event Parameters
value: boolean The new value of .
Fired when the switch is toggled by the user.
Event Parameters
target: this The widget the event was fired on.
checked: boolean The current value of .
thumbOffColorChanged
Fired when the property has changed.
Event Parameters
value: The new value of thumbOffColor.
thumbOnColorChanged
Event Parameters
target: this The widget the event was fired on.
value: The new value of thumbOnColor.
Fired when the property has changed.
Event Parameters
value: The new value of trackOffColor.
trackOnColorChanged
Fired when the trackOnColor property has changed.
Event Parameters
target: this The widget the event was fired on.
value: Color The new value of .
原文: