fromLeft static method

VillainAnimation fromLeft({
  1. double offset = 1.0,
  2. Duration from = Duration.zero,
  3. Duration to = _kMaterialRouteTransitionLength,
  4. Curve curve = Curves.linear,
})

Implementation

static VillainAnimation fromLeft({
  double offset = 1.0,
  Duration from = Duration.zero,
  Duration to = _kMaterialRouteTransitionLength,
  Curve curve = Curves.linear,
}) =>
    VillainAnimation(
        curve: curve,
        from: from,
        to: to,
        animatable:
            Tween<Offset>(begin: Offset(-offset, 0.0), end: Offset(0.0, 0.0)),
        animatedWidgetBuilder: (animation, child) {
          return SlideTransition(
            position: animation as Animation<Offset>,
            child: child,
          );
        });