QlevarRouter and GetX #142
Answered
by
jessicamrbr
jessicamrbr
asked this question in
Q&A
-
Thanks to the author for this incredible lib. Could anyone help me with a suggestion on how to integrate it with GetX to replace just the routing, while keeping the other high-level APIs (translate, theme, sizes,...). |
Beta Was this translation helpful? Give feedback.
Answered by
jessicamrbr
Nov 17, 2023
Replies: 1 comment
-
I found a way. I used GetRoot instead of GetMaterialApp. QRouterDelegate qRouterDelegate = QRouterDelegate(AppRoutes.routes);
GetRoot(
config: ConfigData(
navigatorKey: qRouterDelegate.key,
...
),
child: Builder(
builder: (context) {
final controller = GetRoot.of(context);
return MaterialApp.router(
...
key: controller.config.unikey,
routerDelegate: qRouterDelegate,
routeInformationParser: const QRouteInformationParser(),
builder: (BuildContext getRootCtx, Widget? widget) {
... |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
jessicamrbr
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I found a way. I used GetRoot instead of GetMaterialApp.