mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Scrollable should use scrollTo() instead of setting _scrollOffset directly, when starting an animation.
I'd missed this case when adding Scrollable.scrollTo() https://codereview.chromium.org/1074033002 R=ianh@google.com Review URL: https://codereview.chromium.org/1082163002
This commit is contained in:
parent
03b16f05b5
commit
ef3df2f4fb
@ -69,11 +69,7 @@ abstract class Scrollable extends Component {
|
||||
_simulation = scrollBehavior.release(particle);
|
||||
if (_simulation == null)
|
||||
return;
|
||||
_simulation.onTick.listen((_) {
|
||||
setState(() {
|
||||
_scrollOffset = particle.position;
|
||||
});
|
||||
});
|
||||
_simulation.onTick.listen((_) => scrollTo(particle.position));
|
||||
}
|
||||
|
||||
Particle _createParticle([double velocity = 0.0]) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user