Repository navigation
Stop TextFields from wobbling within scrollables - #24015
Conversation
goderbauer
left a comment
There was a problem hiding this comment.
LGTM with 2 nits.
I believe this also fixes a similar problem during a11y scrolling: #12274
There was a problem hiding this comment.
could the next few lines be replaced by super.moveTo(...)?
There was a problem hiding this comment.
We should probably provide a new doc comment for this method, otherwise dartdocs will show the dartdoc of the superclass, which would incorrectly claim that clamp is ignored?
There was a problem hiding this comment.
The super class does say
.. but subclasses like [ScrollPosition] handle it by adjusting [to] to prevent over or under scrolling
But you're right, it would clearer if there was new doc here.
d0bdc2f to
11e9f63
Compare
|
Its still not working on my end. Tried all the solutions on my end but none of the point seems to be working |
Fixes #20485, #12274
There is an explanation of the problem here #20485 (comment)
Added
ScrollPosition.moveTo()which optionally clamps its offset before callinganimateTo()orjumpTo(). ThemoveTomethod is actually defined byViewportOffset(ScrollPosition's superclass) however that method doesn't have enough information to clamp the scroll offset. IdeallyViewportOffset.moveTo()would be abstract (like the other ViewportOffset methods). It has a concrete implementation for the (unlikely) sake of existing ViewportOffset subclasses.