Flutter Web: How to keep the navbar?

Viewed 61

I have a basic layout for a webapp I'm trying to build with flutter. Basically there is a navbar on the left side of the screen and the content should fill the rest of the page.

Whenever a user clicks a link in the navbar, the content should update accordingly. I have an understanding on how this would work with the "old" Navigator and named routes. However, users need to be able to access certain content directly by url and the url may contain parameters, so do I have to use a Router?

From my (limited) understanding, I have to use MaterialApp.router to use a Router, but this will always redraw the WHOLE page, including the navbar.

Is there an option to update only the content part, without updating the surrounding layout?

Thanks in advance!

1 Answers

Go check out navigationRail in flutter, if that helps.

Related