mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Reset the Dimissable fade animation on slow flings
This commit is contained in:
parent
5183eb9b63
commit
2c5c4538fc
@ -150,11 +150,14 @@ class Dismissable extends StatefulComponent {
|
||||
if (!_isActive)
|
||||
return EventDisposition.ignored;
|
||||
|
||||
_dragUnderway = false;
|
||||
if (_isHorizontalFlingGesture(event)) {
|
||||
_dragUnderway = false;
|
||||
_dragX = event.velocityX.sign;
|
||||
_fadePerformance.fling(velocity: event.velocityX.abs() * _kFlingVelocityScale);
|
||||
} else {
|
||||
_fadePerformance.reverse();
|
||||
}
|
||||
|
||||
return EventDisposition.processed;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user