BaseSwitch.adaptive constructor
BaseSwitch.adaptive({
- Key? key,
- required bool value,
- ValueCallback<
bool> ? onChanged, - ValueCallbackFutureT<
bool> ? onWaitChanged, - ValueCallback<
BuildContext> ? initState, - ValueCallback<
BuildContext> ? didUpdateWidget, - ValueCallback<
BuildContext> ? didChangeDependencies, - ValueCallback<
BuildContext> ? deactivate, - ValueCallback<
BuildContext> ? dispose, - Color? activeColor,
- Color? activeTrackColor,
- MaterialStateProperty<
Color?> ? trackColor, - MaterialStateProperty<
Color?> ? thumbColor, - Color? inactiveThumbColor,
- Color? inactiveTrackColor,
- ImageProvider<
Object> ? activeThumbImage, - ImageErrorListener? onActiveThumbImageError,
- ImageProvider<
Object> ? 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,
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,
));