chore: Follow up imagebubble

pull/953/head
krille-chan 12 months ago
parent ba05050c2b
commit 1271441eb0
No known key found for this signature in database

@ -15,8 +15,8 @@ class ImageBubble extends StatelessWidget {
final Color? backgroundColor; final Color? backgroundColor;
final bool thumbnailOnly; final bool thumbnailOnly;
final bool animated; final bool animated;
final double? width; final double width;
final double? height; final double height;
final void Function()? onTap; final void Function()? onTap;
final BorderRadius? borderRadius; final BorderRadius? borderRadius;
@ -45,8 +45,8 @@ class ImageBubble extends StatelessWidget {
height: height, height: height,
child: BlurHash( child: BlurHash(
hash: blurHashString, hash: blurHashString,
decodingWidth: width?.round() ?? 64, decodingWidth: width.round(),
decodingHeight: height?.round() ?? 64, decodingHeight: height.round(),
imageFit: fit, imageFit: fit,
), ),
); );
@ -83,13 +83,6 @@ class ImageBubble extends StatelessWidget {
borderRadius: borderRadius, borderRadius: borderRadius,
child: Hero( child: Hero(
tag: event.eventId, tag: event.eventId,
child: ConstrainedBox(
constraints: maxSize
? BoxConstraints(
maxWidth: width ?? double.infinity,
maxHeight: height ?? double.infinity,
)
: const BoxConstraints.expand(),
child: MxcImage( child: MxcImage(
event: event, event: event,
width: width, width: width,
@ -101,7 +94,6 @@ class ImageBubble extends StatelessWidget {
), ),
), ),
), ),
),
); );
} }
} }

Loading…
Cancel
Save