LoadingButton constructor

LoadingButton({
  1. Key? key,
  2. double height = 55,
  3. double width = 225,
  4. Widget? child,
  5. IconData? iconData,
  6. required VoidCallback? onPressed,
  7. required LoadingButtonController controller,
  8. double loaderSize = 50.0,
  9. double loaderStrokeWidth = 1.5,
  10. bool animateOnTap = true,
  11. double borderRadius = 25,
  12. double elevation = 5,
  13. Duration duration = const Duration(milliseconds: 500),
  14. Curve curve = Curves.easeInOutCirc,
  15. Color? primaryColor,
  16. Color? errorColor = Colors.redAccent,
  17. Color? successColor = Colors.green,
  18. Color? shadowColor,
  19. Color? valueColor,
  20. Color? disabledColor,
  21. Color? iconColor,
  22. Duration resetDuration = const Duration(seconds: 15),
  23. bool resetAfterDuration = false,
  24. IconData successIcon = Icons.check,
  25. IconData failedIcon = Icons.close,
  26. Curve completionCurve = Curves.elasticOut,
  27. Duration completionDuration = const Duration(milliseconds: 1000),
  28. double spaceBetween = 10,
  29. bool showBox = true,
})

Constructor for the LoadingButton widget.

Implementation

LoadingButton({
  Key? key,
  this.height = 55,
  this.width = 225,
  this.child,
  this.iconData,
  required this.onPressed,
  required this.controller,
  this.loaderSize = 50.0,
  this.loaderStrokeWidth = 1.5,
  this.animateOnTap = true,
  this.borderRadius = 25,
  this.elevation = 5,
  this.duration = const Duration(milliseconds: 500),
  this.curve = Curves.easeInOutCirc,
  this.primaryColor,
  this.errorColor = Colors.redAccent,
  this.successColor = Colors.green,
  this.shadowColor,
  this.valueColor,
  this.disabledColor,
  this.iconColor,
  this.resetDuration = const Duration(seconds: 15),
  this.resetAfterDuration = false,
  this.successIcon = Icons.check,
  this.failedIcon = Icons.close,
  this.completionCurve = Curves.elasticOut,
  this.completionDuration = const Duration(milliseconds: 1000),
  this.spaceBetween = 10,
  this.showBox = true,
}) : super(key: key) {
  assert(child != null || iconData != null);
}