MyRoundedLoadingButton constructor
MyRoundedLoadingButton({
- Key? key,
- required SRoundedLoadingButtonController controller,
- required VoidCallback? onPressed,
- required Widget child,
- Color? color = Colors.lightBlue,
- double height = 50,
- double width = 300,
- double loaderSize = 24.0,
- double loaderStrokeWidth = 2.0,
- bool animateOnTap = true,
- Color valueColor = Colors.white,
- double borderRadius = 35,
- double elevation = 2,
- Duration duration = const Duration(milliseconds: 400),
- Curve curve = Curves.easeInOutCirc,
- Color? errorColor = Colors.red,
- Color? successColor,
- Duration resetDuration = const Duration(seconds: 12),
- bool resetAfterDuration = false,
- IconData successIcon = Icons.check,
- IconData failedIcon = Icons.close,
- Curve completionCurve = Curves.elasticOut,
- Duration completionDuration = const Duration(milliseconds: 800),
- Color? disabledColor,
- FocusNode? focusNode,
- void onFocusChange()?,
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');