bounce method

GetAnimatedBuilder bounce({
  1. required double begin,
  2. required double end,
  3. Duration duration = _defaultDuration,
  4. Duration delay = _defaultDelay,
  5. ValueSetter<AnimationController>? onComplete,
  6. bool isSequential = false,
})

Adds a bounce animation to the widget.

Example:

myWidget.bounce(begin: 0.8, end: 1.2); // Bounces slightly

Implementation

GetAnimatedBuilder bounce({
  required double begin,
  required double end,
  Duration duration = _defaultDuration,
  Duration delay = _defaultDelay,
  ValueSetter<AnimationController>? onComplete,
  bool isSequential = false,
}) {
  return GetAnimatedBuilder<double>(
    duration: duration,
    delay: _getDelay(isSequential, delay),
    tween: Tween<double>(begin: begin, end: end),
    idleValue: begin,
    onComplete: onComplete,
    curve: Curves.bounceInOut,
    builder: (context, value, child) =>
        Transform.scale(scale: value, child: child),
    child: this,
  );
}