Skip to content

Commit

Permalink
Fix issue with onDragEnd (#620)
Browse files Browse the repository at this point in the history
  • Loading branch information
EgorK0rshun committed Sep 7, 2023
1 parent 2f00425 commit b335bb2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 8.1.1

* Fix issue with onDragEnd

## 8.1.0

* Migrate to 3.13.0
Expand Down
4 changes: 2 additions & 2 deletions lib/src/gesture/page_view/gesture_page_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -423,10 +423,10 @@ class ExtendedImageGesturePageViewState
// _drag might be null if the drag activity ended and called _disposeDrag.
assert(_hold == null || _drag == null);
if (!widget.canScrollPage(extendedImageGestureState?.gestureDetails)) {
_drag!.end(DragEndDetails(primaryVelocity: 0.0));
_drag?.end(DragEndDetails(primaryVelocity: 0.0));
return;
}
_drag!.end(details);
_drag?.end(details);
assert(_drag == null);
// return;
// DragEndDetails temp = details;
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_image
description: Official extension image, support placeholder(loading)/ failed state, cache network, zoom/pan, photo view, slide out page, editor(crop,rotate,flip), painting etc.
version: 8.1.0
version: 8.1.1
homepage: https://github.com/fluttercandies/extended_image

environment:
Expand Down

0 comments on commit b335bb2

Please sign in to comment.