AnimatedLoadingButton<T>.colorChangingButton constructor

AnimatedLoadingButton<T>.colorChangingButton({
  1. Key? key,
  2. required Future<T> onPress(),
  3. required dynamic onAsyncCallFinished(
    1. T
    ),
  4. required Widget? buttonChild,
  5. required List<Color> colors,
  6. Duration animationDuration = ConstantValues.defaultDuration,
  7. BorderRadius? buttonRadius,
  8. BoxShadow? buttonShadow,
  9. double buttonWidth = ConstantValues.defaultWidth,
  10. 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;
}