小编Sra*_*rma的帖子

如何使用 FLUTTER go_router 弹出上下文?

如何使用flutter的go_router返回到上一个屏幕?如何弹出上下文?

目前,我只是将一个新屏幕添加到堆栈中,无论我想返回还是前进。

 onTap: (() => context.go("/secondPage"))
Run Code Online (Sandbox Code Playgroud)

我已经使用过 context.pop(),但它抛出错误说 -

_AssertionError ('package:go_router/src/matching.dart': Failed assertion: line 102 pos 9: '_matches.isNotEmpty': You have popped the last page off of the stack, there are no pages left to show)

Run Code Online (Sandbox Code Playgroud)

navigation mobile dart flutter gorouter

9
推荐指数
2
解决办法
1万
查看次数

标签 统计

dart ×1

flutter ×1

gorouter ×1

mobile ×1

navigation ×1