MyRoundedLoadingButton constructor

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

initialize constructor

Implementation

MyRoundedLoadingButton({
  super.key,
  required this.controller,
  required this.onPressed,
  required this.child,
  this.contentKey,
  this.semanticLabel,
  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,
  this.customLoaderWidget,
})  : 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');