Skip to content

Commit

Permalink
fix check
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanschaller committed Mar 12, 2024
1 parent ed59458 commit ec25c37
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/scrollable_bottom_sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,9 @@ class ScrollableBottomSheetState extends State<ScrollableBottomSheet>
// _drag might be null if the drag activity ended and called _disposeDrag.
assert(_hold == null || _drag == null);
_drag?.update(details);
if (_scrollController.position.pixels <= 0 && details.primaryDelta! > 0) {
if (_scrollController.hasClients &&
_scrollController.position.pixels <= 0 &&
details.primaryDelta! > 0) {
setState(() => _isScrollingEnabled = false);
_handleDragCancel();
if (_scrollController.position.pixels != 0.0) {
Expand Down

0 comments on commit ec25c37

Please sign in to comment.