feat(mobile): image caching & viewer improvements (#4095)

This commit is contained in:
Fynn Petersen-Frey
2023-09-18 05:57:05 +02:00
committed by GitHub
parent 63b6a71ebd
commit 1c02e1dadf
10 changed files with 283 additions and 212 deletions

View File

@@ -281,6 +281,7 @@ class _PhotoViewGalleryState extends State<PhotoViewGallery> {
)
: PhotoView(
key: ObjectKey(index),
index: index,
imageProvider: pageOption.imageProvider,
loadingBuilder: widget.loadingBuilder,
backgroundDecoration: widget.backgroundDecoration,
@@ -315,7 +316,10 @@ class _PhotoViewGalleryState extends State<PhotoViewGallery> {
);
}
PhotoViewGalleryPageOptions _buildPageOption(BuildContext context, int index) {
PhotoViewGalleryPageOptions _buildPageOption(
BuildContext context,
int index,
) {
if (widget._isBuilder) {
return widget.builder!(context, index);
}