Commit 5d9d5217 authored by Ian Hickson's avatar Ian Hickson

Catch dismissable while it's animating.

Fixes #173.
parent 4f672dc0
...@@ -139,12 +139,15 @@ class _DismissableState extends State<Dismissable> { ...@@ -139,12 +139,15 @@ class _DismissableState extends State<Dismissable> {
} }
void _handleDragStart(_) { void _handleDragStart(_) {
if (_dismissPerformance.isAnimating)
return;
setState(() { setState(() {
_dragUnderway = true; _dragUnderway = true;
_dragExtent = 0.0; if (_dismissPerformance.isAnimating) {
_dismissPerformance.progress = 0.0; _dragExtent = _dismissPerformance.progress * _size.width * _dragExtent.sign;
_dismissPerformance.stop();
} else {
_dragExtent = 0.0;
_dismissPerformance.progress = 0.0;
}
}); });
} }
......
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