LiveSwitch constructor
const
LiveSwitch({
- Key? key,
- ValueCell<
bool> enabled = const ValueCell.value(true), - required MutableCell<
bool> value, - Color? activeColor,
- Color? activeTrackColor,
- Color? inactiveThumbColor,
- Color? inactiveTrackColor,
- ImageProvider<
Object> ? activeThumbImage, - void onActiveThumbImageError()?,
- ImageProvider<
Object> ? inactiveThumbImage, - void onInactiveThumbImageError()?,
- WidgetStateProperty<
Color?> ? thumbColor, - WidgetStateProperty<
Color?> ? trackColor, - WidgetStateProperty<
Color?> ? trackOutlineColor, - WidgetStateProperty<
double?> ? trackOutlineWidth, - WidgetStateProperty<
Icon?> ? thumbIcon, - MaterialTapTargetSize? materialTapTargetSize,
- DragStartBehavior dragStartBehavior = DragStartBehavior.start,
- MouseCursor? mouseCursor,
- Color? focusColor,
- Color? hoverColor,
- WidgetStateProperty<
Color?> ? overlayColor, - double? splashRadius,
- FocusNode? focusNode,
- void onFocusChange()?,
- bool autofocus = false,
Implementation
const LiveSwitch({
super.key,
this.enabled = const ValueCell.value(true),
required this.value,
this.activeColor,
this.activeTrackColor,
this.inactiveThumbColor,
this.inactiveTrackColor,
this.activeThumbImage,
this.onActiveThumbImageError,
this.inactiveThumbImage,
this.onInactiveThumbImageError,
this.thumbColor,
this.trackColor,
this.trackOutlineColor,
this.trackOutlineWidth,
this.thumbIcon,
this.materialTapTargetSize,
this.dragStartBehavior = DragStartBehavior.start,
this.mouseCursor,
this.focusColor,
this.hoverColor,
this.overlayColor,
this.splashRadius,
this.focusNode,
this.onFocusChange,
this.autofocus = false,
});