bounce method
GetAnimatedBuilder
bounce({
- required double begin,
- required double end,
- Duration duration = _defaultDuration,
- Duration delay = _defaultDelay,
- ValueSetter<
AnimationController> ? onComplete, - 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,
);
}