Skip to content

add pinned callback? #48

@YeungKC

Description

@YeungKC

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions