ToggleSwitch constructor

const ToggleSwitch({
  1. Key? key,
  2. required bool checked,
  3. required ValueChanged<bool>? onChanged,
  4. ToggleSwitchThemeData? style,
  5. String? semanticLabel,
  6. Widget? thumb,
  7. FocusNode? focusNode,
  8. 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);