fullscreen: fix placeholder aspect ratio
This commit is contained in:
parent
44b6d30a49
commit
142b4a5ade
1 changed files with 11 additions and 5 deletions
|
@ -54,12 +54,18 @@ class ImageView extends StatelessWidget {
|
||||||
// if the hero tag wraps the whole `PhotoView` and the `loadingBuilder` is not provided,
|
// if the hero tag wraps the whole `PhotoView` and the `loadingBuilder` is not provided,
|
||||||
// there's a black frame between the hero animation and the final image, even when it's cached.
|
// there's a black frame between the hero animation and the final image, even when it's cached.
|
||||||
|
|
||||||
final loadingBuilder = (context) => Image(
|
final loadingBuilder = (context) => Center(
|
||||||
image: ThumbnailProvider(
|
child: AspectRatio(
|
||||||
entry: entry,
|
// enforce original aspect ratio, as some thumbnails aspect ratios slightly differ
|
||||||
extent: Constants.thumbnailCacheExtent,
|
aspectRatio: entry.displayAspectRatio,
|
||||||
|
child: Image(
|
||||||
|
image: ThumbnailProvider(
|
||||||
|
entry: entry,
|
||||||
|
extent: Constants.thumbnailCacheExtent,
|
||||||
|
),
|
||||||
|
fit: BoxFit.fill,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
fit: BoxFit.contain,
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Widget child;
|
Widget child;
|
||||||
|
|
Loading…
Reference in a new issue