Make the StockHome TabBar selection persistent#824
Conversation
|
This isn't the right fix. We should teach TabBar how to persist this data in PageStorage. Check out how Scrollable saves its scroll offset. |
|
TabBar doesn't own its TabBarSelection the app or page does. In this case I think StockHome would be the logical owner, so I can have it use PageStorage to save the TabBarSelection. |
|
LGTM |
|
Can the TabBarSelection actually be an Inherited widget in the tree itself? Then the tab bar and tab view could crawl up a bit instead of being given a TabBarSelection; and the TabBarSelection could crawl up and find the page storage. |
|
Making the TabBarSelection an InheritedWidget sounds like the right thing to do. If it's OK with you, I'll commit this change, just to fix the bug, and then do the inherited widget. |
|
Oh sure there's no reason to do that in this PR. Feel free to just file a bug for it too. |
fef5283 to
4eeddab
Compare
|
TabBarSelection should be an InheritedWidget |
Make the StockHome TabBar selection persistent Fixes #671
Fixes #671