AnimatedLoadingButton<T>.colorChangingButton constructor
AnimatedLoadingButton<T>.colorChangingButton ({
- Key? key,
- required Future<
T> onPress(), - required dynamic onAsyncCallFinished(
- T
- required Widget? buttonChild,
- required List<
Color> colors, - Duration animationDuration = ConstantValues.defaultDuration,
- BorderRadius? buttonRadius,
- BoxShadow? buttonShadow,
- double buttonWidth = ConstantValues.defaultWidth,
- double buttonHeight = ConstantValues.defaultHeight,
Implementation
AnimatedLoadingButton.colorChangingButton({
Key? key,
required this.onPress,
required this.onAsyncCallFinished,
required this.buttonChild,
required this.colors,
this.animationDuration = ConstantValues.defaultDuration,
this.buttonRadius,
this.buttonShadow,
this.buttonWidth = ConstantValues.defaultWidth,
this.buttonHeight = ConstantValues.defaultHeight,
}) : super(key: key) {
assert(buttonChild != null && colors.length > 1);
buttonColor = Colors.blue;
buttonIcon = null;
buttonText = null;
_buttonAnimation = ButtonAnimation.colorChanging;
progressIndicatorColor = null;
progressIndicatorBackground = null;
progressIndicatorSize = 0;
}