pushAnimationType static method

dynamic pushAnimationType(
  1. BuildContext context,
  2. Widget scene,
  3. AnimationType type
)

跳转页面带动画,传入type类型 type ---> SlideRL 从右到左的滑动 type ---> SlideLR 从左到右的滑动 type ---> SlideTB 从上到下的滑动 type ---> SlideBT 从下到上的滑动 type ---> Fade 透明过渡

Implementation

static pushAnimationType(BuildContext context, Widget scene , AnimationType type) {
  AnimationPageRoute route = new AnimationPageRoute(
    builder: (context) {
      return scene;
    },
    animationType: type,
  );
  Navigator.push(context, route);
}