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 a callback that handles the changes in the state of a sticky header such as "onPinned" #92

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

fujidaiti
Copy link

@fujidaiti fujidaiti commented Jun 25, 2023

This PR fixes #48 and #70 by adding a callback to be called when a sticky header is pinned or unpinned, etc. It also works with reversed scrollable widgets.

  • Added SliverStickyHeaderActivity class that represents an event such as "onPinned"
  • Added the event dispatching logic to RenderSliverStickyHeader
  • Added callback parameters to the constructors of SliverStickyHeader
  • Added a new example to example/lib/main.dart

I hope you find it useful 😀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add pinned callback?
1 participant