Search code examples
flutternavigationclip-pathflutter-bottomnavigation

Is there a way to ClipPath around a BottomAppBar?


Screenshot

I am trying to clip the BottomNavigationBar with a CustomClipper.

Using a clipped BottomAppBar will only work correctly while the widget is in the body-section.

As soon as I put it in bottomNavigationBar-section, the content in the body behind the transparent parts is hidden.

Is there any way to get the 'transparent' parts of the BottomAppBar real transparent?

I could put it back into the body-section and pin it to the bottom and add a hero to it, so it would stay while changing pages, but I guess it would be a better and 'more correct' way, if I could put it in the bottomNavigationBar-section.


Solution

  • You should set:

    extendBody: true
    

    as a property in BottomNavigationBar.