ImageSwitch constructor

const ImageSwitch({
  1. Key? key,
  2. required bool value,
  3. BuilderSwitch? builder,
  4. bool rotate = false,
  5. ValueChanged<bool>? onChanged,
  6. double width = _kDefaultWidth,
  7. double height = _kDefaultHeight,
  8. double radius = _kDefaultHeight / 2,
  9. Color? activeBorderColor,
  10. Color? inactiveBorderColor,
  11. Color activeTrackColor = _kDefaultActiveColor,
  12. Color inactiveTrackColor = _kDefaultInactiveColor,
  13. Color? activeThumbColor = Colors.greenAccent,
  14. Color? inactiveThumbColor = Colors.grey,
  15. Widget? activeImage,
  16. Widget? inactiveImage,
  17. Duration duration = _kDefaultDuration,
  18. double paddingHorizontal = 1.5,
  19. double defaultStyleSize = _kDefaultHeight - 4,
  20. double defaultStyleRadius = 15,
})

Implementation

const ImageSwitch({
  Key? key,
  required this.value,
  this.builder,
  this.rotate = false,
  this.onChanged,
  this.width = _kDefaultWidth,
  this.height = _kDefaultHeight,
  this.radius = _kDefaultHeight / 2, // radius
  this.activeBorderColor,
  this.inactiveBorderColor,
  this.activeTrackColor = _kDefaultActiveColor,
  this.inactiveTrackColor = _kDefaultInactiveColor,
  this.activeThumbColor = Colors.greenAccent,
  this.inactiveThumbColor = Colors.grey,
  this.activeImage,
  this.inactiveImage,
  this.duration = _kDefaultDuration,
  this.paddingHorizontal = 1.5,
  this.defaultStyleSize = _kDefaultHeight-4,
  this.defaultStyleRadius = 15,
}): super(key: key);