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

feat: Support additional custom offset in case of pinned header above… #116

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Ortes
Copy link

@Ortes Ortes commented Sep 20, 2024

No breaking change (I think)
Add support for addition custom offset.

.scrollToIndex() now takes an additional nullable offset parameter which move the final offset by this amount.

@jerrywell
Copy link
Member

jerrywell commented Sep 21, 2024

Hi @Ortes,

This feature can actually be achieved using an alternative method.

e.g.

await scrollController.scrollToIndex(10);
await scrollController.animateTo(scrollController.offset + [Offset], ...);

since the underlying implementation works the same way. : )

@Ortes
Copy link
Author

Ortes commented Sep 23, 2024

Indeed it works but it does not have the exact same behavior because it scroll to the offset then backward (I put negative values because I have a pinned header above so I need to offset negatively)

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.

2 participants