CupertinoSwitch constructor
- Key? key,
- required bool value,
- required ValueChanged<
bool> ? onChanged, - Color? activeColor,
- Color? trackColor,
- Color? thumbColor,
- bool? applyTheme,
- Color? focusColor,
- Color? onLabelColor,
- Color? offLabelColor,
- FocusNode? focusNode,
- ValueChanged<
bool> ? onFocusChange, - bool autofocus = false,
- DragStartBehavior dragStartBehavior = DragStartBehavior.start,
Creates an iOS-style switch.
The dragStartBehavior parameter defaults to DragStartBehavior.start.
Implementation
const CupertinoSwitch({
super.key,
required this.value,
required this.onChanged,
this.activeColor,
this.trackColor,
this.thumbColor,
this.applyTheme,
this.focusColor,
this.onLabelColor,
this.offLabelColor,
this.focusNode,
this.onFocusChange,
this.autofocus = false,
this.dragStartBehavior = DragStartBehavior.start,
});