withScale method
Wrap with scale animation on appear.
Implementation
Widget withScale({
double begin = 0.8,
double end = 1.0,
Duration duration = const Duration(milliseconds: 300),
Curve curve = Curves.easeOutBack,
}) {
return TweenAnimationBuilder<double>(
tween: Tween(begin: begin, end: end),
duration: duration,
curve: curve,
builder: (context, scale, child) => Transform.scale(
scale: scale,
child: child,
),
child: this,
);
}