flutter - Flutter (Web) - 使用带有导航栏的路由
问题描述
是否可以在不加载小部件的情况下在 url (flutter web) 中推送名称?
喜欢 :
return MaterialApp(
title: 'mytitle',
initialRoute: '/home',
routes: {
'/home': (context) => SafeArea(child: NavigationRailBar(initialIndex: 0)),
'/item1': // don't do anything but bind a destination with a url on click of the navigationrail
'/item2' : //
'/item3': //
},
因为 NavigationRail 已经将您送到正确的“目的地”
解决方案
推荐阅读
- single-sign-on - Laravel 临时 SSO 方法
- java - Oracle 19c JDBC(即时客户端 basiclite)驱动程序问题
- javascript - 找不到此 switch 语句的问题所在,它在我的 VS 代码编辑器中的 case 语法中始终显示红色下划线
- angular - 在 BsModalRef 中模拟 modal.content.onClose.subscribe
- python - 在django中调用一对一模型时如何调用应用程序名称?
- flutter - 未来
登录无法编译应用程序 - mongodb - 我正在使用 mongodb 聚合,它期望不同的输出,但没有得到所需的输出
- javascript - 为什么即使我有多次交易,产品收入仍然为 0(Google Analytics Enhanced Ecommerce)
- sql - oracle sql - 获取2个日期之间的差异(sysdate减去另一个表的日期值)
- java - springboot jackson中如何根据默认的ObjectMapper定义不同的ObjectMapper?