Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

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

Merged
merged 1 commit into from
Aug 19, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion examples/widgets/page_scrollable.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
5 changes: 4 additions & 1 deletion sky/packages/sky/lib/widgets/dismissable.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down