diff --git a/CHANGELOG.md b/CHANGELOG.md index 86ac8f9f..63a8bd4e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## [0.6.0] + +* Issues: + Fix issue about strange behaviour at slide out page + ## [0.5.9] * Add HeroBuilderForSlidingPage call back to fix strange hero animation diff --git a/lib/src/extended_image.dart b/lib/src/extended_image.dart index 3e4390c6..58b68ace 100644 --- a/lib/src/extended_image.dart +++ b/lib/src/extended_image.dart @@ -1,4 +1,4 @@ -import 'dart:io'; +import 'dart:io' show File; import 'dart:typed_data'; import 'package:extended_image/src/extended_image_border_painter.dart'; @@ -934,7 +934,7 @@ class _ExtendedImageState extends State } Widget _getIndicator(BuildContext context) { - return Platform.isIOS + return Theme.of(context).platform == TargetPlatform.iOS ? CupertinoActivityIndicator( animating: true, radius: 16.0, diff --git a/lib/src/gesture/extended_image_gesture.dart b/lib/src/gesture/extended_image_gesture.dart index 45434039..1fd67220 100644 --- a/lib/src/gesture/extended_image_gesture.dart +++ b/lib/src/gesture/extended_image_gesture.dart @@ -323,19 +323,6 @@ class _ExtendedImageGestureState extends State gestureDetails: _gestureDetails, ); - image = GestureDetector( - onScaleStart: _handleScaleStart, - onScaleUpdate: _handleScaleUpdate, - onScaleEnd: _handleScaleEnd, - onDoubleTap: _handleDoubleTap, - child: image, - ); - - image = Listener( - child: image, - onPointerDown: _handlePointerDown, - ); - if (widget.extendedImageSlidePageState != null) { image = widget.extendedImageState.imageWidget?.heroBuilderForSlidingPage ?.call(image) ?? @@ -353,6 +340,20 @@ class _ExtendedImageGestureState extends State } } + image = GestureDetector( + onScaleStart: _handleScaleStart, + onScaleUpdate: _handleScaleUpdate, + onScaleEnd: _handleScaleEnd, + onDoubleTap: _handleDoubleTap, + child: image, + ); + + image = Listener( + child: image, + onPointerDown: _handlePointerDown, + ); + + return image; } diff --git a/pubspec.lock b/pubspec.lock index 797ea9a0..58af1a4f 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,13 +1,27 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: + archive: + dependency: transitive + description: + name: archive + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.0.10" + args: + dependency: transitive + description: + name: args + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.5.2" async: dependency: transitive description: name: async url: "https://pub.flutter-io.cn" source: hosted - version: "2.2.0" + version: "2.3.0" boolean_selector: dependency: transitive description: @@ -42,7 +56,7 @@ packages: name: crypto url: "https://pub.flutter-io.cn" source: hosted - version: "2.0.6" + version: "2.1.3" extended_image_library: dependency: "direct main" description: @@ -81,6 +95,13 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "3.1.3" + image: + dependency: transitive + description: + name: image + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.1.4" matcher: dependency: transitive description: @@ -94,14 +115,14 @@ packages: name: meta url: "https://pub.flutter-io.cn" source: hosted - version: "1.1.6" + version: "1.1.7" path: dependency: transitive description: name: path url: "https://pub.flutter-io.cn" source: hosted - version: "1.6.2" + version: "1.6.4" path_provider: dependency: transitive description: @@ -115,14 +136,21 @@ packages: name: pedantic url: "https://pub.flutter-io.cn" source: hosted - version: "1.7.0" + version: "1.8.0+1" + petitparser: + dependency: transitive + description: + name: petitparser + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.4.0" quiver: dependency: transitive description: name: quiver url: "https://pub.flutter-io.cn" source: hosted - version: "2.0.3" + version: "2.0.5" sky_engine: dependency: transitive description: flutter @@ -155,7 +183,7 @@ packages: name: string_scanner url: "https://pub.flutter-io.cn" source: hosted - version: "1.0.4" + version: "1.0.5" term_glyph: dependency: transitive description: @@ -184,6 +212,13 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "2.0.8" + xml: + dependency: transitive + description: + name: xml + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.5.0" sdks: - dart: ">=2.2.2 <3.0.0" + dart: ">=2.4.0 <3.0.0" flutter: ">=0.1.4 <2.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 99b70e95..d2d8bac8 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: 0.5.9 +version: 0.6.0 author: zmtzawqlp homepage: https://github.com/fluttercandies/extended_image