Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions lib/photo_view_gallery.dart
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ class _PhotoViewGalleryState extends State<PhotoViewGallery> {
: PhotoView(
key: ObjectKey(index),
imageProvider: pageOption.imageProvider,
loadingBuilder: widget.loadingBuilder,
loadingBuilder: pageOption.loadingBuilder ?? widget.loadingBuilder,
backgroundDecoration: widget.backgroundDecoration,
wantKeepAlive: widget.wantKeepAlive,
controller: pageOption.controller,
Expand Down Expand Up @@ -343,6 +343,7 @@ class PhotoViewGalleryPageOptions {
this.tightMode,
this.filterQuality,
this.disableGestures,
this.loadingBuilder,
this.errorBuilder,
}) : child = null,
childSize = null,
Expand All @@ -367,7 +368,8 @@ class PhotoViewGalleryPageOptions {
this.tightMode,
this.filterQuality,
this.disableGestures,
}) : errorBuilder = null,
}) : loadingBuilder = null,
errorBuilder = null,
imageProvider = null;

/// Mirror to [PhotoView.imageProvider]
Expand Down Expand Up @@ -427,6 +429,8 @@ class PhotoViewGalleryPageOptions {
/// Quality levels for image filters.
final FilterQuality? filterQuality;

final LoadingBuilder? loadingBuilder;

/// Mirror to [PhotoView.errorBuilder]
final ImageErrorWidgetBuilder? errorBuilder;
}