美文网首页
flutter 返回某页面并销毁俩个页面之间的页面

flutter 返回某页面并销毁俩个页面之间的页面

作者: Smallwolf_JS | 来源:发表于2020-08-24 19:32 被阅读0次

    直接上代码

    Navigator.of(context).push( MaterialPageRoute(
                  settings: RouteSettings(name: "/routeName"),
                  builder: (context) => YourPage(参数 可为空),
               ),
    );
    

    这里是返回的代码

    Navigator.of(context).popUntil(ModalRoute.withName("/routeName"));
    

    相关文章

      网友评论

          本文标题:flutter 返回某页面并销毁俩个页面之间的页面

          本文链接:https://www.haomeiwen.com/subject/nbfojktx.html