fixed photoview gesture resolution to restore tap recognition
This commit is contained in:
parent
bf90ad0b6a
commit
81f72d8322
4 changed files with 12 additions and 6 deletions
|
@ -14,6 +14,7 @@ import 'package:permission_handler/permission_handler.dart';
|
||||||
import 'package:screen/screen.dart';
|
import 'package:screen/screen.dart';
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
|
// debugPrintGestureArenaDiagnostics = true;
|
||||||
runApp(AvesApp());
|
runApp(AvesApp());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,9 +38,10 @@ class MultiImagePageState extends State<MultiImagePage> with AutomaticKeepAliveC
|
||||||
return PhotoViewGestureDetectorScope(
|
return PhotoViewGestureDetectorScope(
|
||||||
axis: scrollDirection,
|
axis: scrollDirection,
|
||||||
child: PageView.builder(
|
child: PageView.builder(
|
||||||
|
scrollDirection: scrollDirection,
|
||||||
controller: widget.pageController,
|
controller: widget.pageController,
|
||||||
|
physics: const PhotoViewPageViewScrollPhysics(parent: BouncingScrollPhysics()),
|
||||||
onPageChanged: widget.onPageChanged,
|
onPageChanged: widget.onPageChanged,
|
||||||
itemCount: entries.length,
|
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
final entry = entries[index];
|
final entry = entries[index];
|
||||||
return ImageView(
|
return ImageView(
|
||||||
|
@ -51,8 +52,7 @@ class MultiImagePageState extends State<MultiImagePage> with AutomaticKeepAliveC
|
||||||
videoControllers: widget.videoControllers,
|
videoControllers: widget.videoControllers,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
scrollDirection: scrollDirection,
|
itemCount: entries.length,
|
||||||
physics: const BouncingScrollPhysics(),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -285,9 +285,9 @@ packages:
|
||||||
photo_view:
|
photo_view:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: photo_view
|
path: "../photo_view"
|
||||||
url: "https://pub.dartlang.org"
|
relative: true
|
||||||
source: hosted
|
source: path
|
||||||
version: "0.9.2"
|
version: "0.9.2"
|
||||||
plugin_platform_interface:
|
plugin_platform_interface:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
|
|
|
@ -64,7 +64,12 @@ dependencies:
|
||||||
pedantic:
|
pedantic:
|
||||||
percent_indicator:
|
percent_indicator:
|
||||||
permission_handler:
|
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:
|
photo_view:
|
||||||
|
path: ../photo_view
|
||||||
|
# git:
|
||||||
|
# url: git://github.com/deckerst/photo_view.git
|
||||||
printing:
|
printing:
|
||||||
provider:
|
provider:
|
||||||
screen:
|
screen:
|
||||||
|
|
Loading…
Reference in a new issue