Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add pinned callback? #48

Open
YeungKC opened this issue Jun 6, 2020 · 0 comments · May be fixed by #92
Open

add pinned callback? #48

YeungKC opened this issue Jun 6, 2020 · 0 comments · May be fixed by #92
Labels
enhancement New feature or request

Comments

@YeungKC
Copy link

YeungKC commented Jun 6, 2020

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants