From da4fbdd4ae518177a9c3af4180ff4838627dd245 Mon Sep 17 00:00:00 2001 From: Hans Muller Date: Mon, 9 Nov 2015 09:39:19 -0800 Subject: [PATCH] Updated {} and fling dismiss Future value --- .../flutter/lib/src/material/bottom_sheet.dart | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/flutter/lib/src/material/bottom_sheet.dart b/packages/flutter/lib/src/material/bottom_sheet.dart index 7ca51dc041..76fa713edc 100644 --- a/packages/flutter/lib/src/material/bottom_sheet.dart +++ b/packages/flutter/lib/src/material/bottom_sheet.dart @@ -39,16 +39,17 @@ 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) {