CupertinoSwitchData constructor
const
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.
Implementation
const CupertinoSwitchData({
super.value,
super.onChanged,
super.widgetKey,
super.isEnabled,
super.activeThumbColor,
super.activeTrackColor,
super.inactiveThumbColor,
super.inactiveTrackColor,
super.focusColor,
super.activeThumbImage,
super.onActiveThumbImageError,
super.inactiveThumbImage,
super.onInactiveThumbImageError,
super.trackOutlineColor,
super.trackOutlineWidth,
super.thumbIcon,
super.dragStartBehavior,
super.mouseCursor,
super.focusNode,
super.onFocusChange,
super.autofocus,
this.applyTheme,
this.onLabelColor,
this.offLabelColor,
});