Commit da4fbdd4 authored by Hans Muller's avatar Hans Muller

Updated {} and fling dismiss Future value

parent 9cb8188a
......@@ -39,17 +39,18 @@ class _BottomSheetDragController extends StatelessComponent {
void _handleDragEnd(Offset velocity, BuildContext context) {
if (_dismissUnderway)
return;
if (velocity.dy > _kMinFlingVelocity)
performance.fling(velocity: -velocity.dy / childHeight).then((dynamic value) {
Navigator.of(context).pop(value);
if (velocity.dy > _kMinFlingVelocity) {
performance.fling(velocity: -velocity.dy / childHeight).then((_) {
Navigator.of(context).pop();
});
else if (performance.progress < _kCloseProgressThreshold)
performance.fling(velocity: -1.0).then((dynamic value) {
Navigator.of(context).pop(value);
} else if (performance.progress < _kCloseProgressThreshold) {
performance.fling(velocity: -1.0).then((_) {
Navigator.of(context).pop();
});
else
} else {
performance.forward();
}
}
Widget build(BuildContext context) {
return new GestureDetector(
......
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