feat(mobile): play motion video with long press gesture support (#6543)

This commit is contained in:
jzhangdev
2024-05-02 23:37:39 +08:00
committed by GitHub
parent 9bce3417e9
commit 42f03af2dc
6 changed files with 52 additions and 0 deletions
@@ -331,6 +331,11 @@ class GalleryViewerPage extends HookConsumerWidget {
onTapDown: (_, __, ___) {
ref.read(showControlsProvider.notifier).toggle();
},
onLongPressStart: (_, __, ___) {
if (asset.livePhotoVideoId != null) {
isPlayingVideo.value = true;
}
},
imageProvider: provider,
heroAttributes: PhotoViewHeroAttributes(
tag: isFromDto