-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
[two_dimensional_scrollables] added child position getter #6745
base: main
Are you sure you want to change the base?
Conversation
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact "@test-exemption-reviewer" in the #hackers channel in Chat (don't just cc them here, they won't see it! Use Discord!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
@Piinks There's a problem with this PR below are the follwoing details:
Please let me know your thoughts on this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @faisalansari0367, thanks for contributing!
Please let me know your thoughts on this.
I am not sure I follow, what is the problem you are trying to solve here? It looks like this PR isn't quite ready for review yet, but it did make me wonder, would it be better to have a getChildOffset type method in the core 2D scrolling classes in the framework? Rather than just in the TableView?
Hi @Piinks, Thanks for your response,
The problem I am trying to solve is to determine the position of an element inside the viewport, which is crucial for developers when creating UIs that are otherwise not possible to achieve. In the video linked below, to create such UIs where we need to know the position of a widget in the viewport (see the spot price in the video), it's mandatory to determine the position of a child element. Based on that position, we can perform various actions, in this case making the element stick to the top or bottom. RPReplay_Final1715363832.MP4
you raise a great point. While I'm not an expert on the framework's internals, having a getChildOffset type method in the core 2D scrolling classes rather than just in the TableView could be incredibly beneficial. This feature would likely provide more flexibility and power to developers. Thanks in advance. |
Would you like to work on sending a PR that adds the method to the core TwoDimensionalViewport class? What should we do with this PR? |
Thank you for the opportunity to contribute! I am interested in working on adding the method to the core TwoDimensionalViewport class. However, I would appreciate some references to help me approach this problem effectively. Specifically, I'd need guidance on the following:
With these references, I will be able to contribute more efficiently. Thank you! |
I am not sure where we might put the method, maybe RenderTwoDimensionalViewport? |
Fixes [two_dimensional_scrollables] childPositionGetter in Tableview.builder #148141
Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2024-05-15.at.21.03.54.mp4
Pre-launch Checklist
dart format
.)[shared_preferences]
pubspec.yaml
with an appropriate new version according to the [pub versioning philosophy], or this PR is [exempt from version changes].CHANGELOG.md
to add a description of the change, [following repository CHANGELOG style].///
).