fromTop static method

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

Implementation

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