I'm trying to get some paths for screens and followed the official document
But it requires routes
setup instead of onGenerateRoute
which is my current implementation?
return MaterialApp(
title: Localized.brand,
scrollBehavior: MaterialScrollBehavior().copyWith(
dragDevices: {
PointerDeviceKind.mouse,
PointerDeviceKind.touch,
},
),
// routes: {}, << Url strategy expects this
onGenerateRoute: AppRouter.setupRouting, // I'm using this
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true,
),
home: const RootScreen(),
)
Is there any way to achieve same with onGenerateRoute
?