ToggleSwitch constructor
const
ToggleSwitch({
- Key? key,
- required bool checked,
- required ValueChanged<
bool> ? onChanged, - ToggleSwitchThemeData? style,
- String? semanticLabel,
- Widget? thumb,
- FocusNode? focusNode,
- bool autofocus = false,
Creates a toggle switch.
Implementation
const ToggleSwitch({
Key? key,
required this.checked,
required this.onChanged,
this.style,
this.semanticLabel,
this.thumb,
this.focusNode,
this.autofocus = false,
}) : super(key: key);