flutter - 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.
解决方案
推荐阅读
- python - 有没有一种好方法可以遍历由 javascript pageNav 值定义的数百个页面?
- java - 不同尺寸设备之间的响应问题
- c++ - 用c++添加一系列数字[1--> 5000]?
- javascript - 收集图中 1 点到所有其他点的距离(并恢复路径)
- ruby - 为什么在一种情况下不能用 shovel << (冻结的字符串)修改字符串(来自 ARGV),但在另一种情况下却可以?
- python - 我可以在 python 的函数中搜索字符串吗?
- python - Python 检查 json 中的键和值
- php - 仅针对特定类别重命名 WooCommerce 运输完整标签
- powershell - 使用 PowerShell 确定处理器架构的简单跨平台方法是什么?
- docker - 在编辑文件之前不会执行 crontab(使用 Dockerfile 设置 crontab)