LiteRollingSwitch constructor

LiteRollingSwitch({
  1. bool value = false,
  2. double width = 130,
  3. String textOff = "Off",
  4. String textOn = "On",
  5. double textSize = 14.0,
  6. Color colorOn = Colors.green,
  7. Color colorOff = Colors.red,
  8. IconData iconOff = Icons.flag,
  9. IconData iconOn = Icons.check,
  10. Duration animationDuration = const Duration(milliseconds: 600),
  11. Color textOffColor = Colors.white,
  12. Color textOnColor = Colors.black,
  13. required Function onTap,
  14. required Function onDoubleTap,
  15. required Function onSwipe,
  16. required dynamic onChanged(
    1. bool
    ),
})

Implementation

LiteRollingSwitch({
  this.value = false,
  this.width = 130,
  this.textOff = "Off",
  this.textOn = "On",
  this.textSize = 14.0,
  this.colorOn = Colors.green,
  this.colorOff = Colors.red,
  this.iconOff = Icons.flag,
  this.iconOn = Icons.check,
  this.animationDuration = const Duration(milliseconds: 600),
  this.textOffColor = Colors.white,
  this.textOnColor = Colors.black,
  required this.onTap,
  required this.onDoubleTap,
  required this.onSwipe,
  required this.onChanged,
});