Switch constructor

const Switch({
  1. Key? key,
  2. required bool value,
  3. required ValueChanged<bool>? onChanged,
  4. Widget? leading,
  5. Widget? trailing,
  6. bool? enabled = true,
  7. double? gap,
  8. Color? activeColor,
  9. Color? inactiveColor,
  10. Color? activeThumbColor,
  11. Color? inactiveThumbColor,
  12. BorderRadiusGeometry? borderRadius,
})

Implementation

const Switch({
  super.key,
  required this.value,
  required this.onChanged,
  this.leading,
  this.trailing,
  this.enabled = true,
  this.gap,
  this.activeColor,
  this.inactiveColor,
  this.activeThumbColor,
  this.inactiveThumbColor,
  this.borderRadius,
});