Skip to content
This repository was archived by the owner on Oct 13, 2025. It is now read-only.

Conversation

@TheCarpetMerchant
Copy link

@TheCarpetMerchant TheCarpetMerchant commented Jun 9, 2022

Description

Added a method to call primary.scrollController.jumpTo and a getter for primary.scrollController.offset.
I used the null-safe operator ! for _scrollableListState without checking for null given that is how it is done in other methods and the existence of isAttached.

Open to suggestions about naming, I don't think the current names are very good but couldn't come up with anything better.

Please note this is my first PR ; be sure to comment about any mistakes I might have made in the process.

Edit : Added a second commit for scrollToPixel, which allows calling primary.scrollController.animateTo.

Related Issues

No related issues, this is just something I need that might be useful for others too.

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I signed the CLA.
  • All tests from running flutter test pass.
  • flutter analyze does not report any problems on my PR.
  • I am willing to follow-up on review comments in a timely manner.

@TheCarpetMerchant TheCarpetMerchant changed the title Added ItemScrollController.jumpToPixel and .currentScrollControllerOffset [scrollable_positioned_list] Added ItemScrollController.jumpToPixel and .currentScrollControllerOffset Jun 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant