scaleIn method

Widget scaleIn({
  1. Duration duration = const Duration(milliseconds: 300),
  2. Curve curve = Curves.elasticOut,
  3. double beginScale = 0.0,
})

Animate with scale

Implementation

Widget scaleIn({
  Duration duration = const Duration(milliseconds: 300),
  Curve curve = Curves.elasticOut,
  double beginScale = 0.0,
}) {
  return TweenAnimationBuilder<double>(
    duration: duration,
    curve: curve,
    tween: Tween<double>(begin: beginScale, end: 1.0),
    builder: (context, value, child) {
      return Transform.scale(
        scale: value,
        child: child,
      );
    },
    child: this,
  );
}