Update ScrollableDetails for 2D scrolling#122555
Update ScrollableDetails for 2D scrolling#122555auto-submit[bot] merged 5 commits intoflutter:masterfrom
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.
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.
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.
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.
Yup! It will, and that is also why I added the assertions, so any use ensures a controller is set. :)
| /// {@macro flutter.widgets.Scrollable.controller} | ||
| final ScrollController? controller; |
There was a problem hiding this comment.
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.