RoundedLoadingButtonGradient constructor Null safety

const RoundedLoadingButtonGradient(
  1. {required RoundedLoadingButtonGradientController controller,
  2. String label = 'This is button',
  3. TextStyle style = const TextStyle(),
  4. double height = 45,
  5. Color? backgroundColor,
  6. Color? overlayColor,
  7. Color? shadowColor,
  8. double? elevation,
  9. double borderRadius = 15,
  10. int durationAnimation = 800,
  11. bool disableButton = false,
  12. Function? onTap,
  13. double sizeIconLeft = 24,
  14. double sizeIconRight = 24,
  15. IconData? iconLeft,
  16. IconData? iconRight,
  17. String? iconPathLeft,
  18. String? iconPathRight,
  19. double? paddingIconLeftLabel,
  20. double? paddingIconRightLabel,
  21. Color? colorIconLeft,
  22. Color? colorIconRight,
  23. double sizeLoading = 18,
  24. double strokeWidth = 2,
  25. Color colorLoading = Colors.white,
  26. Widget? widgetLoading,
  27. Color colorIconError = Colors.white,
  28. Color colorIconSucess = Colors.white,
  29. Color colorBackgroundError = Colors.red,
  30. Color colorBackgroundSuccess = Colors.green,
  31. Gradient? gradient,
  32. Color? disableColor,
  33. Gradient? gradientSucess,
  34. Gradient? gradientError,
  35. IconData? iconSuccess = Icons.check,
  36. IconData? iconError = Icons.error,
  37. double? sizeSuccess = 24,
  38. double? sizeError = 24}
)

Implementation

const RoundedLoadingButtonGradient({
  required this.controller,
  this.label = 'This is button',
  this.style = const TextStyle(),
  this.height = 45,
  this.backgroundColor,
  this.overlayColor,
  this.shadowColor,
  this.elevation,
  this.borderRadius = 15,
  this.durationAnimation = 800,
  this.disableButton = false,
  this.onTap,
  this.sizeIconLeft = 24,
  this.sizeIconRight = 24,
  this.iconLeft,
  this.iconRight,
  this.iconPathLeft,
  this.iconPathRight,
  this.paddingIconLeftLabel,
  this.paddingIconRightLabel,
  this.colorIconLeft,
  this.colorIconRight,
  this.sizeLoading = 18,
  this.strokeWidth = 2,
  this.colorLoading = Colors.white,
  this.widgetLoading,
  this.colorIconError = Colors.white,
  this.colorIconSucess = Colors.white,
  this.colorBackgroundError = Colors.red,
  this.colorBackgroundSuccess = Colors.green,
  this.gradient,
  this.disableColor,
  this.gradientSucess,
  this.gradientError,
  this.iconSuccess = Icons.check,
  this.iconError = Icons.error,
  this.sizeSuccess = 24,
  this.sizeError = 24,
}) : assert(!(sizeLoading > height / 2),
          'load size no larger than split height 2');