Switchy constructor

const Switchy({
  1. Key? key,
  2. required bool value,
  3. required ValueChanged<bool> onChanged,
  4. required dynamic activeIcon,
  5. required dynamic inactiveIcon,
  6. double iconSize = 20,
  7. List<Color> activeColors = const [Color(0xFF27AE60), Color(0xFF2ECC71)],
  8. List<Color> inactiveColors = const [Color(0xFF95A5A6), Color(0xFF7F8C8D)],
  9. Duration duration = const Duration(milliseconds: 400),
  10. double height = 36,
  11. double width = 70,
  12. double circlePadding = 6,
  13. double circleMargin = 6,
  14. double circleSizeRatio = 0.7,
})

Implementation

const Switchy({
  super.key,
  required this.value,
  required this.onChanged,
  required this.activeIcon,
  required this.inactiveIcon,
  this.iconSize = 20,
  this.activeColors = const [Color(0xFF27AE60), Color(0xFF2ECC71)],
  this.inactiveColors = const [Color(0xFF95A5A6), Color(0xFF7F8C8D)],
  this.duration = const Duration(milliseconds: 400),
  this.height = 36,
  this.width = 70,
  this.circlePadding = 6,
  this.circleMargin = 6,
  this.circleSizeRatio = 0.7,
});