bizz84 / bizz84/nested-navigation-demo-flutter

Solution is not performant

Open
#27 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
664
Forks
137
PR merge metrics
No merged PRs in 30d

Description

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?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.