SwitchState constructor
const
SwitchState({
- Key? key,
- required bool value,
- ValueChanged<
bool> ? onChanged, - Color? activeColor,
- Color? activeTrackColor,
- Color? inactiveThumbColor,
- Color? inactiveTrackColor,
- ImageProvider<
Object> ? activeThumbImage, - ImageErrorListener? onActiveThumbImageError,
- ImageProvider<
Object> ? inactiveThumbImage, - ImageErrorListener? onInactiveThumbImageError,
- MaterialStateProperty<
Color?> ? thumbColor, - MaterialStateProperty<
Color?> ? trackColor, - MaterialTapTargetSize? materialTapTargetSize,
- DragStartBehavior dragStartBehavior = DragStartBehavior.start,
- MouseCursor? mouseCursor,
- Color? focusColor,
- Color? hoverColor,
- MaterialStateProperty<
Color?> ? overlayColor, - double? splashRadius,
- FocusNode? focusNode,
- bool autofocus = false,
- ValueCallback<
BuildContext> ? initState, - ValueCallback<
BuildContext> ? dispose, - ValueCallback<
BuildContext> ? didChangeDependencies, - ValueCallback<
BuildContext> ? didUpdateWidget, - SwitchStateChanged? onWaitChanged,
Implementation
const SwitchState(
{super.key,
required this.value,
this.onChanged,
this.activeColor,
this.activeTrackColor,
this.inactiveThumbColor,
this.inactiveTrackColor,
this.activeThumbImage,
this.onActiveThumbImageError,
this.inactiveThumbImage,
this.onInactiveThumbImageError,
this.thumbColor,
this.trackColor,
this.materialTapTargetSize,
this.dragStartBehavior = DragStartBehavior.start,
this.mouseCursor,
this.focusColor,
this.hoverColor,
this.overlayColor,
this.splashRadius,
this.focusNode,
this.autofocus = false,
this.initState,
this.dispose,
this.didChangeDependencies,
this.didUpdateWidget,
this.onWaitChanged})
: _switchType = _SwitchType.material;