Toggle constructor

const Toggle({
  1. Key? key,
  2. required bool value,
  3. ValueChanged<bool>? onChanged,
  4. FocusNode? focusNode,
  5. Color? activeColor,
  6. Color? inactiveColor,
  7. String? label,
})

Creates a Toggle with the given value and optional onChanged.

Implementation

const Toggle({
  super.key,
  required this.value,
  this.onChanged,
  this.focusNode,
  this.activeColor,
  this.inactiveColor,
  this.label,
});