tb2761

fix: check on scrollController.hasClients breaks some behaviour on scoll handling

@@ -231,8 +231,9 @@ class _ModalBottomSheetState extends State<ModalBottomSheet> @@ -231,8 +231,9 @@ class _ModalBottomSheetState extends State<ModalBottomSheet>
231 void _handleScrollUpdate(ScrollNotification notification) { 231 void _handleScrollUpdate(ScrollNotification notification) {
232 if (notification.metrics.pixels <= notification.metrics.minScrollExtent) { 232 if (notification.metrics.pixels <= notification.metrics.minScrollExtent) {
233 //Check if listener is same from scrollController 233 //Check if listener is same from scrollController
234 - if (_scrollController.hasClients &&  
235 - _scrollController.position.pixels != notification.metrics.pixels) { 234 + if (!_scrollController.hasClients) return;
  235 +
  236 + if (_scrollController.position.pixels != notification.metrics.pixels) {
236 return; 237 return;
237 } 238 }
238 DragUpdateDetails dragDetails; 239 DragUpdateDetails dragDetails;