flutter_sticky_headers
flutter_sticky_headers copied to clipboard
Use scrollController instead of ScrollableState
Hey cool work.
I would like to suggest to allow passing a scrollController instead of acquiring the scrollable from the context. The reason i mostly need this is when i have a nested scrollview and i want the stickiness to happen on the top level scrollview's state.
( I have a working example of this, i could do a PR if you are interested )
Hey @spiritinlife i forked this repo, can you PR me? I may need this. I am losing the sticky header when i scroll it and come from another tabbar.
@spiritinlife can you post your working example and I'll take a look at it.
I'm also using this within a TabBarView containing a ListView and lose the state of the headers when navigating to another screen and back (i.e. I pick one of my list items to view that item, then navigate back to the list). Upon returning to the list view, the sticky headers appear misaligned from their children, but redraw correctly upon scrolling. Could this be related to #2?
Swapping LIstView
for a CustomScrollView
and switching to https://github.com/letsar/flutter_sticky_header appears to have resolved the issue for me.