I want to use Get.toNamed from a nested bottom sheet (bottom sheet called from a bottom sheet). However, it is not working. I think it’s because the context is different. If I was using Navigator, Navigator.of(context, rootNavigator: true).pushNamed("/route");
this would work. However, in my case, I must use the GetX router because the given route is taking in arguments from Get.arguments
. Is there any workaround to make Get.toNamed work?
2
Answers
I realized that Get.arguments can read arguments even if
Navigator
was used to come to a route. So I just usedNavigator.of(context, rootNavigator: true).pushNamed('/home', arguments: {'tab': 2});
It’s hard to see where the problem is without looking at you code. GetX is just a wrapper around Navigator, so both should work.
Try