diff --git a/lib/main.dart b/lib/main.dart index 0f7c9d046..28dbedbaf 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -14,6 +14,7 @@ import 'package:permission_handler/permission_handler.dart'; import 'package:screen/screen.dart'; void main() { +// debugPrintGestureArenaDiagnostics = true; runApp(AvesApp()); } diff --git a/lib/widgets/fullscreen/image_page.dart b/lib/widgets/fullscreen/image_page.dart index c1cd3074a..dfdef9bb6 100644 --- a/lib/widgets/fullscreen/image_page.dart +++ b/lib/widgets/fullscreen/image_page.dart @@ -38,9 +38,10 @@ class MultiImagePageState extends State with AutomaticKeepAliveC return PhotoViewGestureDetectorScope( axis: scrollDirection, child: PageView.builder( + scrollDirection: scrollDirection, controller: widget.pageController, + physics: const PhotoViewPageViewScrollPhysics(parent: BouncingScrollPhysics()), onPageChanged: widget.onPageChanged, - itemCount: entries.length, itemBuilder: (context, index) { final entry = entries[index]; return ImageView( @@ -51,8 +52,7 @@ class MultiImagePageState extends State with AutomaticKeepAliveC videoControllers: widget.videoControllers, ); }, - scrollDirection: scrollDirection, - physics: const BouncingScrollPhysics(), + itemCount: entries.length, ), ); } diff --git a/pubspec.lock b/pubspec.lock index a91230c9d..2da7ce26c 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -285,9 +285,9 @@ packages: photo_view: dependency: "direct main" description: - name: photo_view - url: "https://pub.dartlang.org" - source: hosted + path: "../photo_view" + relative: true + source: path version: "0.9.2" plugin_platform_interface: dependency: transitive diff --git a/pubspec.yaml b/pubspec.yaml index 37bfab0b4..964b32452 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -64,7 +64,12 @@ dependencies: pedantic: percent_indicator: permission_handler: + # photo_view v0.9.2 has issue https://github.com/renancaraujo/photo_view/issues/216 + # https://github.com/renancaraujo/photo_view/pull/266 does not fix it photo_view: + path: ../photo_view +# git: +# url: git://github.com/deckerst/photo_view.git printing: provider: screen: