Navigator返回的几个写法区别
来源:11-9 基于HiOverlay实现弹幕输入界面

irebirth
2022-07-29
Navigator.of(context).pop() 、Navigator.pop(context, text)、Navigator.maybePop(context)区别?
写回答
1回答
-
CrazyCodeBoy
2022-07-31
1、Navigator.pop(context,text)等价于Navigator.of(context).pop(text)
2、Navigator.pop.maybePop 在上述两个方法的基础上多了一个如果堆栈只有一个页面则不将这个页面关闭的兜底;00
相似问题