Open HaelArena opened 6 months ago
I got the same error when clicking on top outside SafeArea
GestureDetector( onLongPressUp: () { showCupertinoModalBottomSheet( isDismissible: true, backgroundColor: lightBlackNavBar, useRootNavigator: true, context: context, duration: Duration(milliseconds: 200), builder: (context) => Container( height: 300, child: Center(child: Text('I tuoi account')), ), ); },
I'm trying to open the bottom modal sheet but when I tap outside to dismiss the bottom sheet it throws the error:
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: 'package:flutter/src/widgets/scroll_controller.dart': Failed assertion: line 201 pos 12: '_positions.isNotEmpty': ScrollController not attached to any scroll views. #0 _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:51:61) #1 _AssertionError._throwNew (dart:core-patch/errors_patch.dart:40:5) #2 ScrollController.animateTo (package:flutter/src/widgets/scroll_controller.dart:201:12) #3 ModalBottomSheetState.build. (package:modal_bottom_sheet/src/bottom_sheet.dart:417:27) #4 _StatusBarGestureDetectorState.build.. (package:modal_bottom_sheet/src/utils/scroll_to_top_status_bar.dart:47:40) #5 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:315:24) #6 TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:652:11) #7 BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/t<…>
Do you have any solution?
I got the same error when clicking on top outside SafeArea
Do you have any solution for this?
same issue
GestureDetector( onLongPressUp: () { showCupertinoModalBottomSheet( isDismissible: true, backgroundColor: lightBlackNavBar, useRootNavigator: true, context: context, duration: Duration(milliseconds: 200), builder: (context) => Container( height: 300, child: Center(child: Text('I tuoi account')), ), ); },
I'm trying to open the bottom modal sheet but when I tap outside to dismiss the bottom sheet it throws the error:
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: 'package:flutter/src/widgets/scroll_controller.dart': Failed assertion: line 201 pos 12: '_positions.isNotEmpty': ScrollController not attached to any scroll views.
0 _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:51:61)
1 _AssertionError._throwNew (dart:core-patch/errors_patch.dart:40:5)
2 ScrollController.animateTo (package:flutter/src/widgets/scroll_controller.dart:201:12)
3 ModalBottomSheetState.build. (package:modal_bottom_sheet/src/bottom_sheet.dart:417:27)
4 _StatusBarGestureDetectorState.build.. (package:modal_bottom_sheet/src/utils/scroll_to_top_status_bar.dart:47:40)
5 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:315:24)
6 TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:652:11)
7 BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/t<…>