如何使用flutter的go_router返回上一个屏幕?如何弹出上下文?
目前,我只是将新屏幕添加到堆栈中,无论是要返回还是前进。
我使用了
目前,我只是将新屏幕添加到堆栈中,无论是要返回还是前进。
onTap: (() => context.go("/secondPage"))
我使用了
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)