scale static method

VillainAnimation scale({
  1. double fromScale = 0.5,
  2. double toScale = 1.0,
  3. Duration from = Duration.zero,
  4. Duration to = _kMaterialRouteTransitionLength,
  5. Curve curve = Curves.linear,
})

Implementation

static VillainAnimation scale({
  double fromScale = 0.5,
  double toScale = 1.0,
  Duration from = Duration.zero,
  Duration to = _kMaterialRouteTransitionLength,
  Curve curve = Curves.linear,
}) =>
    VillainAnimation(
        from: from,
        to: to,
        curve: curve,
        animatable: Tween<double>(begin: fromScale, end: toScale),
        animatedWidgetBuilder: (animation, child) {
          return ScaleTransition(
            scale: animation as Animation<double>,
            child: child,
          );
        });