Switch constructor
const
Switch({
- Key? key,
- bool? value,
- bool? defaultValue,
- ValueChanged<
bool> ? onChanged, - ControlSize? size,
- bool? disabled,
- bool readOnly = false,
- bool loading = false,
- String? semanticsLabel,
- Widget? checkedChild,
- Widget? uncheckedChild,
- SwitchToken? token,
- FocusNode? focusNode,
- bool autofocus = false,
Creates a Switch.
Implementation
const Switch({
super.key,
this.value,
this.defaultValue,
this.onChanged,
this.size,
this.disabled,
this.readOnly = false,
this.loading = false,
this.semanticsLabel,
this.checkedChild,
this.uncheckedChild,
this.token,
this.focusNode,
this.autofocus = false,
});