SwitchState constructor

const SwitchState({
  1. Key? key,
  2. required bool value,
  3. ValueChanged<bool>? onChanged,
  4. Color? activeColor,
  5. Color? activeTrackColor,
  6. Color? inactiveThumbColor,
  7. Color? inactiveTrackColor,
  8. ImageProvider<Object>? activeThumbImage,
  9. ImageErrorListener? onActiveThumbImageError,
  10. ImageProvider<Object>? inactiveThumbImage,
  11. ImageErrorListener? onInactiveThumbImageError,
  12. MaterialStateProperty<Color?>? thumbColor,
  13. MaterialStateProperty<Color?>? trackColor,
  14. MaterialTapTargetSize? materialTapTargetSize,
  15. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  16. MouseCursor? mouseCursor,
  17. Color? focusColor,
  18. Color? hoverColor,
  19. MaterialStateProperty<Color?>? overlayColor,
  20. double? splashRadius,
  21. FocusNode? focusNode,
  22. bool autofocus = false,
  23. ValueCallback<BuildContext>? initState,
  24. ValueCallback<BuildContext>? dispose,
  25. ValueCallback<BuildContext>? didChangeDependencies,
  26. ValueCallback<BuildContext>? didUpdateWidget,
  27. 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;