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… Read More Get.toNamed not working from bottom sheet / different context

Centering Floating Action Button in navigation bar Flutter

I have created a navigation bar in flutter, now I want to add a button in between the navbar icons as shown in this image. I want this But I am getting this. I am getting this I brought the button in the middle with following code: floatingActionButton: FloatingActionButton( onPressed: () {}, child: const Icon(PhosphorIcons.plusLight,color:… Read More Centering Floating Action Button in navigation bar Flutter

How to replace 2 Navigator.pop with one method?

Say I use Navigator.pop(context) 2 times in a row to close the AlerDialog and close the page. Is it possible to replace these 2 methods with one function? If so, how? ElevatedButton( child: const Text(‘Do not save’), onPressed: () { Navigator.pop(context); Navigator.pop(context); }), >Solution : One way is to use Navigator.popUntil Here’s an example of… Read More How to replace 2 Navigator.pop with one method?

error: The argument type 'Null' can't be assigned to the parameter type 'Map<String, dynamic>'

I am writing my first Flutter App with some online tutorials and I found error that I can’t fix it. I am trying to add Navigation by Navigator, but I can’t understand why it doesn’t work. Once I am using Navigator in GestureDetector and it works fine, but I don’t know what I supposed to… Read More error: The argument type 'Null' can't be assigned to the parameter type 'Map<String, dynamic>'