Skip to content

Commit

Permalink
Remove unnecessary assert(fix #149)
Browse files Browse the repository at this point in the history
  • Loading branch information
zmtzawqlp committed Dec 27, 2023
1 parent 6d66ce3 commit acf0f82
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 6.2.1

* Remove unnecessary assert(fix #149)


## 6.2.0

* Merge code from https://github.com/flutter/flutter/pull/123109 (fix #148)
Expand Down
15 changes: 7 additions & 8 deletions lib/src/extended_nested_scroll_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1042,10 +1042,11 @@ class _NestedScrollCoordinator
return;
}
innerCanDrag = innerCanDrag
// This refers to the physics of the actual inner scroll position, not
// the whole NestedScrollView, since it is possible to have different
// ScrollPhysics for the inner and outer positions.
|| position.physics.shouldAcceptUserOffset(position);
// This refers to the physics of the actual inner scroll position, not
// the whole NestedScrollView, since it is possible to have different
// ScrollPhysics for the inner and outer positions.
||
position.physics.shouldAcceptUserOffset(position);
}
_outerPosition!.updateCanDrag(innerCanDrag);
}
Expand Down Expand Up @@ -1618,7 +1619,6 @@ class _NestedScrollPosition extends ScrollPosition
return coordinator.pointerScroll(delta);
}


@override
void jumpToWithoutSettling(double value) {
assert(false);
Expand All @@ -1642,13 +1642,12 @@ class _NestedScrollPosition extends ScrollPosition

void updateCanDrag(bool innerCanDrag) {
// This is only called for the outer position
assert(coordinator._outerPosition == this);
// assert(coordinator._outerPosition == this);
context.setCanDrag(
// This refers to the physics of the actual outer scroll position, not
// the whole NestedScrollView, since it is possible to have different
// ScrollPhysics for the inner and outer positions.
physics.shouldAcceptUserOffset(this)
|| innerCanDrag,
physics.shouldAcceptUserOffset(this) || innerCanDrag,
);
}

Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: extended_nested_scroll_view
description: extended nested scroll view to fix pinned header and inner scrollables sync issues.
version: 6.2.0
version: 6.2.1
repository: https://github.com/fluttercandies/extended_nested_scroll_view
issue_tracker: https://github.com/fluttercandies/extended_nested_scroll_view/issues

Expand Down

0 comments on commit acf0f82

Please sign in to comment.