Switch constructor

const Switch({
  1. Key? key,
  2. bool? value,
  3. bool? defaultValue,
  4. ValueChanged<bool>? onChanged,
  5. ControlSize? size,
  6. bool? disabled,
  7. bool readOnly = false,
  8. bool loading = false,
  9. String? semanticsLabel,
  10. Widget? checkedChild,
  11. Widget? uncheckedChild,
  12. SwitchToken? token,
  13. FocusNode? focusNode,
  14. 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,
});