RoundedLoadingButtonGradient constructor
const
RoundedLoadingButtonGradient({
- required RoundedLoadingButtonGradientController controller,
- String label = 'This is button',
- TextStyle style = const TextStyle(),
- double height = 45,
- Color? backgroundColor,
- Color? overlayColor,
- Color? shadowColor,
- double? elevation,
- double borderRadius = 15,
- int durationAnimation = 800,
- bool disableButton = false,
- Function? onTap,
- double sizeIconLeft = 24,
- double sizeIconRight = 24,
- IconData? iconLeft,
- IconData? iconRight,
- String? iconPathLeft,
- String? iconPathRight,
- double? paddingIconLeftLabel,
- double? paddingIconRightLabel,
- Color? colorIconLeft,
- Color? colorIconRight,
- double sizeLoading = 18,
- double strokeWidth = 2,
- Color colorLoading = Colors.white,
- Widget? widgetLoading,
- Color colorIconError = Colors.white,
- Color colorIconSucess = Colors.white,
- Color colorBackgroundError = Colors.red,
- Color colorBackgroundSuccess = Colors.green,
- Gradient? gradient,
- Color? disableColor,
- Gradient? gradientSucess,
- Gradient? gradientError,
- IconData? iconSuccess = Icons.check,
- IconData? iconError = Icons.error,
- double? sizeSuccess = 24,
- 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');