ModulaToggleButton constructor

const ModulaToggleButton({
  1. required bool value,
  2. required ValueChanged<bool> onChanged,
  3. Key? key,
  4. double width = 60.0,
  5. double height = 30.0,
  6. double borderRadius = 20.0,
  7. Color activeColor = Colors.green,
  8. Color inactiveColor = Colors.grey,
  9. Color thumbColor = Colors.white,
  10. IconData? activeIcon,
  11. IconData? inactiveIcon,
  12. Duration animationDuration = const Duration(milliseconds: 300),
  13. bool isCircleShape = true,
  14. bool showIconsOnThumb = false,
})

Implementation

const ModulaToggleButton({
  required this.value,
  required this.onChanged,
  super.key,
  this.width = 60.0,
  this.height = 30.0,
  this.borderRadius = 20.0,
  this.activeColor = Colors.green,
  this.inactiveColor = Colors.grey,
  this.thumbColor = Colors.white,
  this.activeIcon,
  this.inactiveIcon,
  this.animationDuration = const Duration(milliseconds: 300),
  this.isCircleShape = true,
  this.showIconsOnThumb = false,
});