底部导航
添加跳转页面
实现跳转
顶部导航
切换页面
跳转路由
添加新页面
命名路由
设置命名路由:
routes: {'/service': (BuildContext context) => ServiceScreen(),'/schedule': (BuildContext context) => ScheduleScreen(),'/profile': (BuildContext context) => ProfileScreen(),'/article': (BuildContext context) => ArticleScreen(),}
跳转路由
点击跳转路由:
onTap: () {Navigator.pushNamed(context, '/article');},
注意
想要实现跳转新页面时覆盖底部导航,首先要找到主页面(即进入App时的第一个页面),然后在主页面内设置命名路由。


