MyRoundedLoadingButton constructor

MyRoundedLoadingButton({
  1. Key? key,
  2. required SRoundedLoadingButtonController controller,
  3. required VoidCallback? onPressed,
  4. required Widget child,
  5. Color? color = Colors.lightBlue,
  6. double height = 50,
  7. double width = 300,
  8. double loaderSize = 24.0,
  9. double loaderStrokeWidth = 2.0,
  10. bool animateOnTap = true,
  11. Color valueColor = Colors.white,
  12. double borderRadius = 35,
  13. double elevation = 2,
  14. Duration duration = const Duration(milliseconds: 400),
  15. Curve curve = Curves.easeInOutCirc,
  16. Color? errorColor = Colors.red,
  17. Color? successColor,
  18. Duration resetDuration = const Duration(seconds: 12),
  19. bool resetAfterDuration = false,
  20. IconData successIcon = Icons.check,
  21. IconData failedIcon = Icons.close,
  22. Curve completionCurve = Curves.elasticOut,
  23. Duration completionDuration = const Duration(milliseconds: 800),
  24. Color? disabledColor,
  25. FocusNode? focusNode,
  26. void onFocusChange(
    1. bool
    )?,
})

initialize constructor

Implementation

MyRoundedLoadingButton({
  super.key,
  required this.controller,
  required this.onPressed,
  required this.child,
  this.color = Colors.lightBlue,
  this.height = 50,
  this.width = 300,
  this.loaderSize = 24.0,
  this.loaderStrokeWidth = 2.0,
  this.animateOnTap = true,
  this.valueColor = Colors.white,
  this.borderRadius = 35,
  this.elevation = 2,
  this.duration = const Duration(milliseconds: 400),
  this.curve = Curves.easeInOutCirc,
  this.errorColor = Colors.red,
  this.successColor,
  this.resetDuration = const Duration(seconds: 12),
  this.resetAfterDuration = false,
  this.successIcon = Icons.check,
  this.failedIcon = Icons.close,
  this.completionCurve = Curves.elasticOut,
  this.completionDuration = const Duration(milliseconds: 800),
  this.disabledColor,
  this.focusNode,
  this.onFocusChange,
})  : assert(height.isFinite, 'Height must be a finite number'),
      assert(width.isFinite, 'Width must be a finite number'),
      assert(borderRadius.isFinite, 'Border radius must be a finite number');