首页 > 其他 > 详细

flutter 隐藏返回按钮

时间:2019-09-18 16:44:53      阅读:170      评论:0      收藏:0      [点我收藏+]
Don't want to display that ugly back button ( :] ), and thus go for : AppBar(...,automaticallyImplyLeading: false,...);

Don't want the user to go back - replacing current view - and thus go for: Navigator.pushReplacementNamed(## your routename here ##);

Don't want the user to go back - replacing a certain view back in the stack - and thus use: Navigator.pushNamedAndRemoveUntil(## your routename here ##, f(Route<dynamic>)→bool); where f is a function returning truewhen meeting the last view you want to keep in the stack (right before the new one);

Don't want the user to go back - EVER - emptying completely the navigator stack with: Navigator.pushNamedAndRemoveUntil(context, ## your routename here ##, (_) => false);

https://stackoverflow.com/a/46713257

flutter 隐藏返回按钮

原文:https://www.cnblogs.com/qqcc1388/p/11543262.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!