Showing
1 changed file
with
2 additions
and
1 deletions
@@ -231,7 +231,8 @@ class _ModalBottomSheetState extends State<ModalBottomSheet> | @@ -231,7 +231,8 @@ 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.position.pixels != notification.metrics.pixels) { | 234 | + if (_scrollController.hasClients && |
235 | + _scrollController.position.pixels != notification.metrics.pixels) { | ||
235 | return; | 236 | return; |
236 | } | 237 | } |
237 | DragUpdateDetails dragDetails; | 238 | DragUpdateDetails dragDetails; |
-
Please register or login to post a comment