viewer: fixed loading background for video cover
This commit is contained in:
parent
0431164ca6
commit
9a35e6e1d2
2 changed files with 4 additions and 1 deletions
|
@ -14,6 +14,7 @@ class RasterImageThumbnail extends StatefulWidget {
|
||||||
final AvesEntry entry;
|
final AvesEntry entry;
|
||||||
final double extent;
|
final double extent;
|
||||||
final BoxFit fit;
|
final BoxFit fit;
|
||||||
|
final bool showLoadingBackground;
|
||||||
final ValueNotifier<bool>? cancellableNotifier;
|
final ValueNotifier<bool>? cancellableNotifier;
|
||||||
final Object? heroTag;
|
final Object? heroTag;
|
||||||
|
|
||||||
|
@ -22,6 +23,7 @@ class RasterImageThumbnail extends StatefulWidget {
|
||||||
required this.entry,
|
required this.entry,
|
||||||
required this.extent,
|
required this.extent,
|
||||||
this.fit = BoxFit.cover,
|
this.fit = BoxFit.cover,
|
||||||
|
this.showLoadingBackground = true,
|
||||||
this.cancellableNotifier,
|
this.cancellableNotifier,
|
||||||
this.heroTag,
|
this.heroTag,
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
@ -174,7 +176,7 @@ class _RasterImageThumbnailState extends State<RasterImageThumbnail> {
|
||||||
final imageInfo = _lastImageInfo;
|
final imageInfo = _lastImageInfo;
|
||||||
final image = imageInfo == null
|
final image = imageInfo == null
|
||||||
? Container(
|
? Container(
|
||||||
color: backgroundColor,
|
color: widget.showLoadingBackground ? backgroundColor : Colors.transparent,
|
||||||
width: extent,
|
width: extent,
|
||||||
height: extent,
|
height: extent,
|
||||||
)
|
)
|
||||||
|
|
|
@ -216,6 +216,7 @@ class _EntryPageViewState extends State<EntryPageView> {
|
||||||
entry: entry,
|
entry: entry,
|
||||||
extent: context.select<MediaQueryData, double>((mq) => mq.size.shortestSide),
|
extent: context.select<MediaQueryData, double>((mq) => mq.size.shortestSide),
|
||||||
fit: BoxFit.contain,
|
fit: BoxFit.contain,
|
||||||
|
showLoadingBackground: false,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in a new issue