flutter 跳转至根路由

上代码

//flutter 登录后跳转到根路由

Navigator.of(context).pushNamedAndRemoveUntil(
'/RepeatLogin',
(route) => false,//true 保留当前栈 false 销毁所有 只留下RepeatLogin
arguments: {

},
);

 

原文地址:https://www.cnblogs.com/tianmiaogongzuoshi/p/11436399.html