首页 > 解决方案 > Use popUntil Navigator method with custom transition animation

问题描述

I have 3 screens A -> B -> C. Screen B is pushed from screen A, screen C is pushed from B. My goal now is to call this method of navigator:

Navigator.popUntil(
 context,
 (route) => route.isFirst,
);

But apply custom animation like I was doing when pushing those screens. Example of animation I was using when pushing screen was this (where screen slides from the top):

Navigator.push(
  context,
  SlideInRoute(
    page: ScreenB(),
    direction: SlideInDirection.Top,
  ),
);

End result now is that I've made FlipRoute class that flips 2 screens, and I want flip to root.

标签: flutter

解决方案


推荐阅读