flutter_sticky_headers icon indicating copy to clipboard operation
flutter_sticky_headers copied to clipboard

Use scrollController instead of ScrollableState

Open spiritinlife opened this issue 5 years ago • 4 comments

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 )

spiritinlife avatar Dec 17 '18 09:12 spiritinlife

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.

dmvvilela avatar Apr 17 '19 16:04 dmvvilela

@spiritinlife can you post your working example and I'll take a look at it.

slightfoot avatar May 22 '19 18:05 slightfoot

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?

bgetsug avatar Jun 28 '19 19:06 bgetsug

Swapping LIstView for a CustomScrollView and switching to https://github.com/letsar/flutter_sticky_header appears to have resolved the issue for me.

bgetsug avatar Jun 29 '19 00:06 bgetsug