diff --git a/lib/widgets/content/image.dart b/lib/widgets/content/image.dart index 55e3a1b7..bf17fb39 100644 --- a/lib/widgets/content/image.dart +++ b/lib/widgets/content/image.dart @@ -31,31 +31,35 @@ class UniversalImage extends StatelessWidget { height != null ? (height! * devicePixelRatio).round() : null; } - return Stack( - fit: StackFit.expand, - children: [ - if (blurHash != null) BlurHash(hash: blurHash!), - CachedNetworkImage( - imageUrl: uri, - fit: fit, - width: width, - height: height, - memCacheHeight: cacheHeight, - memCacheWidth: cacheWidth, - progressIndicatorBuilder: (context, url, progress) { - return Center( - child: CircularProgressIndicator(value: progress.progress), - ); - }, - errorWidget: (context, url, error) { - return Image.asset( - 'assets/images/media-offline.jpg', - fit: BoxFit.cover, - key: Key('image-broke-$uri'), - ); - }, - ), - ], + return SizedBox( + width: width, + height: height, + child: Stack( + fit: StackFit.expand, + children: [ + if (blurHash != null) BlurHash(hash: blurHash!), + CachedNetworkImage( + imageUrl: uri, + fit: fit, + width: width, + height: height, + memCacheHeight: cacheHeight, + memCacheWidth: cacheWidth, + progressIndicatorBuilder: (context, url, progress) { + return Center( + child: CircularProgressIndicator(value: progress.progress), + ); + }, + errorWidget: (context, url, error) { + return Image.asset( + 'assets/images/media-offline.jpg', + fit: BoxFit.cover, + key: Key('image-broke-$uri'), + ); + }, + ), + ], + ), ); } }