MacosSwitch constructor

const MacosSwitch({
  1. Key? key,
  2. required bool value,
  3. required ValueChanged<bool>? onChanged,
  4. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  5. Color? activeColor,
  6. Color? trackColor,
  7. String? semanticLabel,
})

A switch is a visual toggle between two mutually exclusive states — on and off. A switch shows that it's on when the accent color is visible and off when the switch appears colorless.

Implementation

const MacosSwitch({
  super.key,
  required this.value,
  required this.onChanged,
  this.dragStartBehavior = DragStartBehavior.start,
  this.activeColor,
  this.trackColor,
  this.semanticLabel,
});