diff --git a/CHANGELOG.md b/CHANGELOG.md index 93752f9b..7d01d9a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 8.1.1 + +* Fix issue with onDragEnd + ## 8.1.0 * Migrate to 3.13.0 diff --git a/lib/src/gesture/page_view/gesture_page_view.dart b/lib/src/gesture/page_view/gesture_page_view.dart index daa3f93e..5df6152a 100644 --- a/lib/src/gesture/page_view/gesture_page_view.dart +++ b/lib/src/gesture/page_view/gesture_page_view.dart @@ -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; diff --git a/pubspec.yaml b/pubspec.yaml index 3397aaba..a45f5782 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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: