mirror of
https://github.com/alibaba/flutter-go.git
synced 2025-08-24 02:46:57 +08:00
修复游客登录到 home 页时没有传入 router 的 name的问题
修改「widget_demo」中 「Home」IconButton 的点击事件为返回到 '/home'
This commit is contained in:
@ -185,7 +185,7 @@ class _WidgetDemoState extends State<WidgetDemo> {
|
||||
new IconButton(
|
||||
tooltip: 'goBack home',
|
||||
onPressed: () {
|
||||
Navigator.popUntil(context, ModalRoute.withName('/'));
|
||||
Navigator.popUntil(context, ModalRoute.withName(Routes.home));
|
||||
},
|
||||
icon: Icon(Icons.home),
|
||||
),
|
||||
|
@ -388,11 +388,7 @@ class _LoginPageState extends State<LoginPage> {
|
||||
decoration: TextDecoration.underline),
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pushAndRemoveUntil(
|
||||
MaterialPageRoute(
|
||||
builder: (context) =>
|
||||
AppPage(UserInformation(id: 0))),
|
||||
(route) => route == null);
|
||||
Application.router.navigateTo(context, Routes.home, clearStack: true);
|
||||
},
|
||||
)
|
||||
],
|
||||
|
Reference in New Issue
Block a user