嘿,我在我的应用程序中使用 flutter 自动路由器包,我想添加交换手势以在页面之间返回,尝试了几件事,但没有任何效果。
this is the main.dart
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
AppRouter appRouter = AppRouter();
return FlutterSizer(builder: (context, orientation, deviceType) {
return MaterialApp.router(
themeMode: ThemeMode.system,
theme: ThemeData.light(),
darkTheme: ThemeData.light(),
routerConfig: appRouter.config(),
);
});
}
}
尝试了几个包装,并尝试用手势和一些构建器来包装我的材料。
嘿,你找到解决办法了吗? 如果路由器内有路由,则默认添加滑动手势。但是在 2 个路由器之间导航时,我无法执行此操作。