Commit da4fbdd4 authored by Hans Muller's avatar Hans Muller

Updated {} and fling dismiss Future value

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