Closed csells closed 2 years ago
This PR #56 updates the example nested_nav.dart
to demonstrate it with the FamilyView
tab content screen(s). The usage is described in example comments, but may still need a mention in the readme.
It is a good idea to add this to the example, as the usage of the AutomaticKeepAliveClientMixin
is not necessarily so well known among Flutter developers. It would of course be easier to try it and see that it works, if there was more scrollable content on the example screens, but in a Web build it can be tested by resizing the browser window to see it.
fixed in v2.0.0.
Shawn: "If you stick an AutomaticKeepAliveClientMixin on any of the top-level tabs, then they retain their state between tabs and you get the full "nested navigation + persistent tabs" that many folks are looking for. Just had to make FamilyView stateful, and add that mixin to the state, and the ListView remembers it's scroll position between routes! The entire widget state is retained. Like I can add a counter btn to each view, or a textfield, totally retains state between tabs."