CNSwitch constructor

const CNSwitch({
  1. Key? key,
  2. required bool value,
  3. required ValueChanged<bool> onChanged,
  4. bool enabled = true,
  5. CNSwitchController? controller,
  6. double height = 44.0,
  7. Color? color,
})

Creates a Cupertino-native switch.

Implementation

const CNSwitch({
  super.key,
  required this.value,
  required this.onChanged,
  this.enabled = true,
  this.controller,
  this.height = 44.0,
  this.color,
});