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