SmoothToggle constructor Null safety

const SmoothToggle(
  1. {bool value = false,
  2. String textRight = 'Off',
  3. String textLeft = 'On',
  4. double textSize = 14.0,
  5. dynamic colorRight = Colors.red,
  6. dynamic colorLeft = Colors.green,
  7. required dynamic iconRight,
  8. required dynamic iconLeft,
  9. Duration animationDuration = const Duration(milliseconds: 320),
  10. dynamic onTap,
  11. dynamic onDoubleTap,
  12. dynamic onSwipe,
  13. required dynamic onChanged(
    1. bool
    ),
  14. double width = 150.0,
  15. double height = 50.0}
)

Implementation

const SmoothToggle({
  this.value = false,
  this.textRight = 'Off',
  this.textLeft = 'On',
  this.textSize = 14.0,
  this.colorRight = Colors.red,
  this.colorLeft = Colors.green,
  required this.iconRight,
  required this.iconLeft,
  this.animationDuration = const Duration(milliseconds: 320),
  this.onTap,
  this.onDoubleTap,
  this.onSwipe,
  required this.onChanged,
  this.width = 150.0,
  this.height = 50.0,
});