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) {