Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Get.toNamed not working from bottom sheet / different context

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?

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

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

Get.offAndToNamed<void>()
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading