LiveSwitch constructor

const LiveSwitch({
  1. Key? key,
  2. ValueCell<bool> enabled = const ValueCell.value(true),
  3. required MutableCell<bool> value,
  4. Color? activeColor,
  5. Color? activeTrackColor,
  6. Color? inactiveThumbColor,
  7. Color? inactiveTrackColor,
  8. ImageProvider<Object>? activeThumbImage,
  9. void onActiveThumbImageError(
    1. Object,
    2. StackTrace?
    )?,
  10. ImageProvider<Object>? inactiveThumbImage,
  11. void onInactiveThumbImageError(
    1. Object,
    2. StackTrace?
    )?,
  12. WidgetStateProperty<Color?>? thumbColor,
  13. WidgetStateProperty<Color?>? trackColor,
  14. WidgetStateProperty<Color?>? trackOutlineColor,
  15. WidgetStateProperty<double?>? trackOutlineWidth,
  16. WidgetStateProperty<Icon?>? thumbIcon,
  17. MaterialTapTargetSize? materialTapTargetSize,
  18. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  19. MouseCursor? mouseCursor,
  20. Color? focusColor,
  21. Color? hoverColor,
  22. WidgetStateProperty<Color?>? overlayColor,
  23. double? splashRadius,
  24. FocusNode? focusNode,
  25. void onFocusChange(
    1. bool
    )?,
  26. 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,
});