ButtonAnimationStyle.bounce constructor

ButtonAnimationStyle.bounce({
  1. Duration duration = const Duration(milliseconds: 150),
  2. Curve curve = Curves.easeOutBack,
  3. bool enableHapticFeedback = true,
  4. double scaleMin = 0.92,
})

Scale down on press, spring back on release Best for add to cart, like buttons

Implementation

factory ButtonAnimationStyle.bounce({
  Duration duration = const Duration(milliseconds: 150),
  Curve curve = Curves.easeOutBack,
  bool enableHapticFeedback = true,
  double scaleMin = 0.92,
}) {
  return ButtonAnimationStyle._(
    type: ButtonAnimationType.bounce,
    duration: duration,
    curve: curve,
    enableHapticFeedback: enableHapticFeedback,
    scaleMin: scaleMin,
  );
}