scale method
GetAnimatedBuilder
scale({
- required double begin,
- required double end,
- Duration duration = _defaultDuration,
- Duration delay = _defaultDelay,
- ValueSetter<
AnimationController> ? onComplete, - bool isSequential = false,
Adds a scale animation to the widget.
Example:
myWidget.scale(begin: 0.5, end: 1.5); // Scales from half to 1.5x size
Implementation
GetAnimatedBuilder scale({
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,
builder: (context, value, child) =>
Transform.scale(scale: value, child: child),
child: this,
);
}