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
Update ScrollableDetails for 2D scrolling #122555
Conversation
nit: the doc check is unhappy about some references. |
/// {@macro flutter.widgets.Scrollable.controller} | ||
final ScrollController? controller; |
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.
Why is this nullable now? I noticed same new asserts above that assert its not. Maybe add some docs describing in what circumstances this needs to be set?
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.
Will do! This is nullable now because it needs to be ok for developers to not provide a scroll controller when using ScrollableDetails to configure a 2D scroller. This allows for things like PrimaryScrollController.
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.
Am I right to assume that the 2D scroller will than fill this in with a ScrollController before this reaches the decoration stuff, which assumes this is set?
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.
Yup! It will, and that is also why I added the assertions, so any use ensures a controller is set. :)
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
/// {@macro flutter.widgets.Scrollable.controller} | ||
final ScrollController? controller; |
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.
Am I right to assume that the 2D scroller will than fill this in with a ScrollController before this reaches the decoration stuff, which assumes this is set?
2D Scrolling proposal: flutter.dev/go/2D-Foundation
Fixes #122415
This expands the ScrollableDetails class to incorporate more properties of Scrollable. This will allow users to specify details for the scrollable of each axis without an ugly API that enumerates everything twice.
Highlights:
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.