flutter_sticky_header icon indicating copy to clipboard operation
flutter_sticky_header copied to clipboard

add pinned callback?

Open YeungKC opened this issue 5 years ago • 0 comments

Sometimes a callback may be needed to make sure that the header is fixed. Maybe it would be better to add a callback?

example:

SliverStickyHeader(
      pinnedCallback: (stickyHeaderScrollOffset){
        // do something
      },
      header: Header(index: index),
      sliver: SliverList(
        delegate: SliverChildBuilderDelegate(
          (context, i) => ListTile(
            leading: CircleAvatar(
              child: Text('$index'),
            ),
            title: Text('List tile #$i'),
          ),
          childCount: 6,
        ),
      ),
    )

maybe use StickyHeaderController?

YeungKC avatar Jun 06 '20 14:06 YeungKC