Flutter and go_router - Navigator into only a portion of the screen with sidebar menu and app_bar

68 views Asked by At

Flutter and go_router - Navigator into only a portion of the screen

A homepage with a left sidebar, top appbar and central body for pages

Hi, I'm a beginner and I need some help.

I would like to get a homepage for a web application with these characteristics:

  • side menu on the left (fixed) with 20 item,
  • button bar at the top,
  • central body for the various pages.

Homepage

When I select the menu on the left, the first page opens in the body of the screen and the button appears in the app_bar.

Page 1

If I open a second page I can consult the two open pages by switching with the buttons on the app_bar. The two pages must maintain the state.

Page 2

If the open page is a paginatedDataTable I can open the detail page in the same location. In this case the app_bar button must show me the consistent page when swiching.

Example: Two pages open (A and B tables) with two switch buttons in the app_bar. If I open a detail page (A1) and then consult the other page (B), when I return on (A1), I must find the detail (A1) and not table A

I haven't found a complete example. Almost everyone is focused on the bottombar.

Can I have a complete and working example?

Thanks and sorry for my English.

Biagio

1

There are 1 answers

0
Marko On

Have you tried to use push instead of go? In that case, the new page B will be pushed on top of the current page A and when you call context.pop() it will navigate back to the current A page without resetting the state of the page A