flutter_sticky_headers icon indicating copy to clipboard operation
flutter_sticky_headers copied to clipboard

How to know we scroll to header?

Open taipower opened this issue 4 years ago • 3 comments

taipower avatar Mar 08 '20 06:03 taipower

I want to know index of header.

taipower avatar Mar 08 '20 06:03 taipower

Hello Did you find any solution? @taipower

shw2ypro avatar Dec 13 '21 13:12 shw2ypro

ListView.builder(
   itemCount: 3,
   itemBuilder: (context, index) {
      return StickyHeaderBuilder(
         builder: (context, stuckAmount) {
            stuckAmount = 1.0 - stuckAmount.clamp(0.0, 1.0);
            if(stuckAmount == 1) print('$index is actived');
         return SizedBox();
     },
    content: Text('$index'),);
});

hoangsang17th avatar Oct 09 '23 07:10 hoangsang17th