chore: Follow up imagebubble
This commit is contained in:
parent
ba05050c2b
commit
1271441eb0
1 changed files with 12 additions and 20 deletions
|
|
@ -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,22 +83,14 @@ class ImageBubble extends StatelessWidget {
|
||||||
borderRadius: borderRadius,
|
borderRadius: borderRadius,
|
||||||
child: Hero(
|
child: Hero(
|
||||||
tag: event.eventId,
|
tag: event.eventId,
|
||||||
child: ConstrainedBox(
|
child: MxcImage(
|
||||||
constraints: maxSize
|
event: event,
|
||||||
? BoxConstraints(
|
width: width,
|
||||||
maxWidth: width ?? double.infinity,
|
height: height,
|
||||||
maxHeight: height ?? double.infinity,
|
fit: fit,
|
||||||
)
|
animated: animated,
|
||||||
: const BoxConstraints.expand(),
|
isThumbnail: thumbnailOnly,
|
||||||
child: MxcImage(
|
placeholder: _buildPlaceholder,
|
||||||
event: event,
|
|
||||||
width: width,
|
|
||||||
height: height,
|
|
||||||
fit: fit,
|
|
||||||
animated: animated,
|
|
||||||
isThumbnail: thumbnailOnly,
|
|
||||||
placeholder: _buildPlaceholder,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue