Commit 9de941db authored by Hans Muller's avatar Hans Muller

Merge pull request #695 from HansMuller/dismissable-drag-fling

Dismissable: correct handling of a drag that ends with a fling
parents 967b7a74 cf164071
...@@ -56,7 +56,6 @@ class TestApp extends App { ...@@ -56,7 +56,6 @@ class TestApp extends App {
} }
Widget buildCard(CardModel cardModel) { Widget buildCard(CardModel cardModel) {
print("SKY buildCard ${cardModel.label}");
Widget card = new Card( Widget card = new Card(
color: cardModel.color, color: cardModel.color,
child: new Container( child: new Container(
......
...@@ -153,7 +153,10 @@ class Dismissable extends StatefulComponent { ...@@ -153,7 +153,10 @@ class Dismissable extends StatefulComponent {
_dragUnderway = false; _dragUnderway = false;
if (_isHorizontalFlingGesture(event)) { if (_isHorizontalFlingGesture(event)) {
_dragX = event.velocityX.sign; _dragX = event.velocityX.sign;
_fadePerformance.fling(velocity: event.velocityX.abs() * _kFlingVelocityScale); if (_fadePerformance.isCompleted)
_startResizePerformance();
else
_fadePerformance.fling(velocity: event.velocityX.abs() * _kFlingVelocityScale);
} else { } else {
_fadePerformance.reverse(); _fadePerformance.reverse();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment