BaseSwitch.adaptive constructor

BaseSwitch.adaptive({
  1. Key? key,
  2. required bool value,
  3. ValueCallback<bool>? onChanged,
  4. ValueCallbackFutureT<bool>? onWaitChanged,
  5. ValueCallback<BuildContext>? initState,
  6. ValueCallback<BuildContext>? didUpdateWidget,
  7. ValueCallback<BuildContext>? didChangeDependencies,
  8. ValueCallback<BuildContext>? deactivate,
  9. ValueCallback<BuildContext>? dispose,
  10. Color? activeColor,
  11. Color? activeTrackColor,
  12. MaterialStateProperty<Color?>? trackColor,
  13. MaterialStateProperty<Color?>? thumbColor,
  14. Color? inactiveThumbColor,
  15. Color? inactiveTrackColor,
  16. ImageProvider<Object>? activeThumbImage,
  17. ImageErrorListener? onActiveThumbImageError,
  18. ImageProvider<Object>? inactiveThumbImage,
  19. ImageErrorListener? onInactiveThumbImageError,
  20. MaterialTapTargetSize? materialTapTargetSize,
  21. MaterialStateProperty<Color?>? trackOutlineColor,
  22. MaterialStateProperty<double?>? trackOutlineWidth,
  23. MaterialStateProperty<Icon?>? thumbIcon,
  24. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  25. MouseCursor? mouseCursor,
  26. Color? focusColor,
  27. Color? hoverColor,
  28. MaterialStateProperty<Color?>? overlayColor,
  29. double? splashRadius,
  30. FocusNode? focusNode,
  31. ValueChanged<bool>? onFocusChange,
  32. bool autofocus = false,
  33. bool? applyCupertinoTheme,
})

Implementation

BaseSwitch.adaptive({
  super.key,
  required super.value,
  super.onChanged,
  super.onWaitChanged,
  super.initState,
  super.didUpdateWidget,
  super.didChangeDependencies,
  super.deactivate,
  super.dispose,
  Color? activeColor,
  Color? activeTrackColor,
  MaterialStateProperty<Color?>? trackColor,
  MaterialStateProperty<Color?>? thumbColor,
  Color? inactiveThumbColor,
  Color? inactiveTrackColor,
  ImageProvider? activeThumbImage,
  ImageErrorListener? onActiveThumbImageError,
  ImageProvider? inactiveThumbImage,
  ImageErrorListener? onInactiveThumbImageError,
  MaterialTapTargetSize? materialTapTargetSize,
  MaterialStateProperty<Color?>? trackOutlineColor,
  MaterialStateProperty<double?>? trackOutlineWidth,
  MaterialStateProperty<Icon?>? thumbIcon,
  DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  MouseCursor? mouseCursor,
  Color? focusColor,
  Color? hoverColor,
  MaterialStateProperty<Color?>? overlayColor,
  double? splashRadius,
  FocusNode? focusNode,
  ValueChanged<bool>? onFocusChange,
  bool autofocus = false,
  bool? applyCupertinoTheme,
}) : super(
          builder: (bool value, onChanged) => Switch.adaptive(
                trackColor: trackColor,
                thumbColor: thumbColor,
                activeTrackColor: activeTrackColor,
                activeColor: activeColor ?? Universally().mainColor,
                value: value,
                onChanged: onChanged,
                inactiveThumbColor: inactiveThumbColor,
                inactiveTrackColor: inactiveTrackColor,
                activeThumbImage: activeThumbImage,
                onActiveThumbImageError: onActiveThumbImageError,
                inactiveThumbImage: inactiveThumbImage,
                onInactiveThumbImageError: onInactiveThumbImageError,
                materialTapTargetSize: materialTapTargetSize,
                trackOutlineColor: trackOutlineColor,
                trackOutlineWidth: trackOutlineWidth,
                thumbIcon: thumbIcon,
                dragStartBehavior: dragStartBehavior,
                mouseCursor: mouseCursor,
                focusColor: focusColor,
                hoverColor: hoverColor,
                overlayColor: overlayColor,
                splashRadius: splashRadius,
                focusNode: focusNode,
                onFocusChange: onFocusChange,
                autofocus: autofocus,
                applyCupertinoTheme: applyCupertinoTheme,
              ));