Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solution is not performant #27

Open
lAleksia opened this issue Jan 21, 2023 · 0 comments
Open

Solution is not performant #27

lAleksia opened this issue Jan 21, 2023 · 0 comments

Comments

@lAleksia
Copy link

Hi there Andrea - it would be great to get your view on the questions I am raising.

I see that this example is an updated version based on what you originally wrote in Medium in 2018 :

https://medium.com/coding-with-flutter/flutter-case-study-multiple-navigators-with-bottomnavigationbar-90eb6caa6dbf.

The new updated version has been changed to accommodate GoRouter etc. I also notice that you have further explained this (and performance issues with your original approach) here :

https://codewithandrea.com/articles/flutter-bottom-navigation-bar-nested-routes-gorouter-beamer/

However, both approaches still cause unnecessary rebuilds for the entire widget tree. This happens when :

  • Any tab is pressed (All TABS get rebuilt regardless of which tab is pressed)
  • Testing in a Tablet, Orientation changes causes ALL Tabs to get rebuilt.
  • Keyboard input on 1 tab causes ALL tabs to get rebuilt

Furthermore, I have noticed considerable performance issues using OffStage - presumably this is because when the widget comes back 'onstage' based on it being the current tab selected, it gets completely rebuilt.

I see no reason why selecting 1 tab should rebuild ALL tabs so consequently - is a limitation of your use of GoRouter/Beamer or Flutter itself?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant