From 43c9017882f82191fdf7121941c07eda102dabd0 Mon Sep 17 00:00:00 2001 From: Hans Muller Date: Wed, 19 Aug 2015 10:45:07 -0700 Subject: [PATCH] Dismissable: correct handling of a drag that ends with a fling --- examples/widgets/page_scrollable.dart | 1 - sky/packages/sky/lib/widgets/dismissable.dart | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/widgets/page_scrollable.dart b/examples/widgets/page_scrollable.dart index 3297169079c51..a4df1be22fe98 100644 --- a/examples/widgets/page_scrollable.dart +++ b/examples/widgets/page_scrollable.dart @@ -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( diff --git a/sky/packages/sky/lib/widgets/dismissable.dart b/sky/packages/sky/lib/widgets/dismissable.dart index ed88a99fa3baa..8f23d5850973f 100644 --- a/sky/packages/sky/lib/widgets/dismissable.dart +++ b/sky/packages/sky/lib/widgets/dismissable.dart @@ -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(); }