Switch constructor

const Switch({
  1. required bool value,
  2. required String label,
  3. required void onChanged(
    1. bool newValue
    ),
  4. bool focused = false,
  5. Style style = Style.empty,
  6. Style focusedStyle = const Style(modifiers: Modifier.reverse),
})

Creates a new Switch.

Implementation

const Switch({
  required this.value,
  required this.label,
  required this.onChanged,
  this.focused = false,
  this.style = Style.empty,
  this.focusedStyle = const Style(modifiers: Modifier.reverse),
});