ModulaSwitch constructor

const ModulaSwitch({
  1. required bool value,
  2. required ValueChanged<bool> onChanged,
  3. Key? key,
  4. String? labelOn,
  5. String? labelOff,
  6. IconData? iconOn,
  7. IconData? iconOff,
  8. Color activeColor = Colors.blue,
  9. Color inactiveColor = Colors.grey,
  10. bool enableHaptic = true,
  11. double width = 70,
  12. double height = 32,
  13. bool reverseLabelPosition = false,
  14. Color? iconColor,
  15. IconData? thumbIconOn,
  16. IconData? thumbIconOff,
  17. Color? thumbIconColor,
})

Implementation

const ModulaSwitch({
  required this.value,
  required this.onChanged,
  super.key,
  this.labelOn,
  this.labelOff,
  this.iconOn,
  this.iconOff,
  this.activeColor = Colors.blue,
  this.inactiveColor = Colors.grey,
  this.enableHaptic = true,
  this.width = 70,
  this.height = 32,
  this.reverseLabelPosition = false,
  this.iconColor,
  this.thumbIconOn,
  this.thumbIconOff,
  this.thumbIconColor,
});