scale method
Scales the widget in and out
Implementation
Widget scale({
required bool visible,
double begin = 0.0,
double end = 1.0,
Duration duration = const Duration(milliseconds: 300),
Curve curve = Curves.easeInOut,
bool autoRun = true, // Automatically run animation on build
}) {
return AnimatedVisibility(
visible: visible,
autoRun: autoRun,
builder: (context, animationVisible) => AnimatedScale(
scale: animationVisible ? end : begin,
duration: duration,
curve: curve,
child: this,
),
child: this,
);
}