I use Getx in my flutter app and want to add go router for deep link configuration. this is a part of code:
return GetMaterialApp(
debugShowCheckedModeBanner: false,
title: 'App_Name',
theme: theme,
initialRoute: '/',
onGenerateRoute: router.generateRoute,
...
I want to change top code same this:
return GetMaterialApp.rouer(
debugShowCheckedModeBanner: false,
title: 'App_Name',
theme: theme,
routerConfig: _router,
onGenerateRoute: router.generateRoute,
...
but after adding .router this command the below line can not recognize:
onGenerateRoute: router.generateRoute,
how can I combine these two part?
return GetMaterialApp.router(
routeInformationParser: _router.routeInformationParser,
routerDelegate: _router.routerDelegate,
routeInformationProvider: _router.routeInformationProvider,
...
);
_router
is GoRouter instance
Here is the link https://github.com/jonataslaw/getx/issues/2778#issuecomment-1659779574
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With