-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Fix SliverGridRegularTileLayout.computeMaxScrollOffset for 0 children #123348
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
Conversation
|
Hi @nehaaaa6 thanks for the feedback. I feel that SliverGridRegularTileLayout should handle this since anyone can instantiate and use this to create tile layouts. It should definitely handle the case for 0. :) |
thkim1011
left a comment
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.
LGTM!
goderbauer
left a comment
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.
LGTM
Fixes #59663
SliverGridRegularTileLayout.computeMaxScrollOffset did not account for a child count of 0.
This would either produce a crash or report the wrong value.
This case would cause a crash from a negative scroll extent. 💀
This would just report the wrong value > 0. 🙃
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.