This repository was archived by the owner on Oct 13, 2025. It is now read-only.
[scrollable_positioned_list] Added ItemScrollController.jumpToPixel and .currentScrollControllerOffset #388
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Added a method to call
primary.scrollController.jumpToand a getter forprimary.scrollController.offset.I used the null-safe operator
!for_scrollableListStatewithout checking for null given that is how it is done in other methods and the existence ofisAttached.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 callingprimary.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.flutter testpass.flutter analyzedoes not report any problems on my PR.