Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

showModalBottomSheet not working properly within nested go router navigation

I am using go_router package for Navigation 2.0, but while running showModalBottomSheetFunction, the view is not showing correctly. Here is the picture: enter image description here

By the way, I am using nested navigation for bottom navigation bar.

I was expecting that ModalBottomSheet should look proper.

like image 610
Nijat Namazzade Avatar asked Oct 19 '25 08:10

Nijat Namazzade


1 Answers

The navigation bar is probably above your navigation tree (the nested one). To cover the navigation bar with the bottom sheet use: useRootNavigator: true

    showModalBottomSheet(
        useRootNavigator: true,
        context: context,
        builder: (BuildContext context) {
            return const Text("hello");
        });
like image 64
Thaerith Avatar answered Oct 21 '25 02:10

Thaerith



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!