【发布时间】:2022-01-13 07:27:32
【问题描述】:
我为我的应用使用路由器。 并使用 Navigator.pushNamed 来使用它。 但我不想要它的动画。
MaterialApp(
debugShowCheckedModeBanner: false,
routes: routes,
initialRoute: '/firstPage')
这是我的路线:
Map<String, WidgetBuilder> routes = <String, WidgetBuilder>{
'/firstPage': (context) => const FirstPage(),
'/': (context) => const BottomNavBar( activeTabIndex: 0, widgetActive: ExploreHome(), ),
// another routes
};
我将它用于呼叫路由:
Navigator.pushNamed(
context,
'/',
arguments: {
"title": "explore",
"text": "something"
},);
并使用final args = (ModalRoute.of(context)!.settings.arguments ??{"title": " ", "text": ""}) as dynamic; 为我的ExploreHome() 类获取参数。
那么我怎样才能删除动画路由器呢?
【问题讨论】:
标签: flutter dart animation routes router