mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-11-21 20:00:49 +01:00
MainShell read MediaQuery.sizeOf and watched the queued download count in its own build. Every rebuild creates new _TabNavigator widgets, and Navigator.didUpdateWidget calls changedExternalState on every route, so each resize frame (and each mini player animation frame on desktop) and each download count change rebuilt every page of every tab, hidden tabs and pushed album or playlist pages included. The count part also hit phones on every queued or finished download. The navigation chrome now reads both in a Consumer below the shell and receives the same tab view instance each time, so only the chrome rebuilds. The scroll listeners read the collapse condition without depending on the window size. Layout, badges and the rail/bar swap are unchanged. Measured with a page that reads neither value, pushed in the hidden Library tab (test/main_shell_rebuild_test.dart, desktop and phone, both styles): 10 resize frames rebuilt it 10 times before and 0 times now; two download count changes rebuilt it twice before and 0 times now. The tab navigators, Navigators and tab root pages keep their instances.