MacosSwitch constructor
const
MacosSwitch({
- Key? key,
- required bool value,
- required ValueChanged<
bool> ? onChanged, - DragStartBehavior dragStartBehavior = DragStartBehavior.start,
- Color? activeColor,
- Color? trackColor,
- 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,
});