Flutter Getx Get.offAll() 返回到根

发布于 4 个月前 作者 phonegap100 164 次浏览 最后一次编辑是 4 个月前 来自 分享

Flutter Getx 对应视频教程访问https://www.itying.com/goods-1176.html

Flutter原生路由返回到根的方法:

Navigator.of(context).pushAndRemoveUntil(

         MaterialPageRoute(builder: (BuildContext context) { 

           return const Tabs(index: 4);

          })

         , (route) => false);

Flutter使用Getx后返回到根的方法

 Get.offAll( const Tabs(index: 4));
回到顶部