SlidingSwitch constructor

const SlidingSwitch({
  1. required bool value,
  2. required ValueChanged<bool> onChanged,
  3. double height = 55,
  4. double width = 250,
  5. Duration animationDuration = const Duration(milliseconds: 400),
  6. required Function onTap,
  7. required Function onDoubleTap,
  8. required Function onSwipe,
  9. String textOff = "Off",
  10. String textOn = "On",
  11. IconData? iconOff,
  12. IconData? iconOn,
  13. double contentSize = 17,
  14. Color colorOn = const Color(0xffdc6c73),
  15. Color colorOff = const Color(0xff6682c0),
  16. Color background = const Color(0xffe4e5eb),
  17. Color buttonColor = const Color(0xfff7f5f7),
  18. Color inactiveColor = const Color(0xff636f7b),
})

Implementation

const SlidingSwitch({
  required this.value,
  required this.onChanged,
  this.height = 55,
  this.width = 250,
  this.animationDuration = const Duration(milliseconds: 400),
  required this.onTap,
  required this.onDoubleTap,
  required this.onSwipe,
  this.textOff = "Off",
  this.textOn = "On",
  this.iconOff,
  this.iconOn,
  this.contentSize = 17,
  this.colorOn = const Color(0xffdc6c73),
  this.colorOff = const Color(0xff6682c0),
  this.background = const Color(0xffe4e5eb),
  this.buttonColor = const Color(0xfff7f5f7),
  this.inactiveColor = const Color(0xff636f7b),
}) : super();