Dismissable: correct handling of a drag that ends with a fling

This commit is contained in:
Hans Muller
2015-08-19 10:45:07 -07:00
parent 7782a11534
commit cf164071c7
2 changed files with 4 additions and 2 deletions

View File

@@ -56,7 +56,6 @@ class TestApp extends App {
}
Widget buildCard(CardModel cardModel) {
print("SKY buildCard ${cardModel.label}");
Widget card = new Card(
color: cardModel.color,
child: new Container(

View File

@@ -153,7 +153,10 @@ class Dismissable extends StatefulComponent {
_dragUnderway = false;
if (_isHorizontalFlingGesture(event)) {
_dragX = event.velocityX.sign;
_fadePerformance.fling(velocity: event.velocityX.abs() * _kFlingVelocityScale);
if (_fadePerformance.isCompleted)
_startResizePerformance();
else
_fadePerformance.fling(velocity: event.velocityX.abs() * _kFlingVelocityScale);
} else {
_fadePerformance.reverse();
}