chore: Follow up imagebubble borderradius

This commit is contained in:
Krille 2023-11-11 15:36:11 +01:00
parent 0aaee82ec7
commit cdc844a4c0
No known key found for this signature in database
3 changed files with 10 additions and 2 deletions

View file

@ -18,6 +18,7 @@ class ImageBubble extends StatelessWidget {
final double width;
final double height;
final void Function()? onTap;
final BorderRadius? borderRadius;
const ImageBubble(
this.event, {
@ -30,6 +31,7 @@ class ImageBubble extends StatelessWidget {
this.height = 300,
this.animated = false,
this.onTap,
this.borderRadius,
super.key,
});
@ -80,14 +82,16 @@ class ImageBubble extends StatelessWidget {
@override
Widget build(BuildContext context) {
final borderRadius =
this.borderRadius ?? BorderRadius.circular(AppConfig.borderRadius);
return Material(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(AppConfig.borderRadius),
borderRadius: borderRadius,
side: BorderSide(color: Theme.of(context).dividerColor),
),
child: InkWell(
onTap: () => _onTap(context),
borderRadius: BorderRadius.circular(AppConfig.borderRadius),
borderRadius: borderRadius,
child: Hero(
tag: event.eventId,
child: ConstrainedBox(

View file

@ -242,6 +242,7 @@ class Message extends StatelessWidget {
displayEvent,
textColor: textColor,
onInfoTab: onInfoTab,
borderRadius: borderRadius,
),
if (event.hasAggregatedEvents(
timeline,

View file

@ -26,12 +26,14 @@ class MessageContent extends StatelessWidget {
final Event event;
final Color textColor;
final void Function(Event)? onInfoTab;
final BorderRadius borderRadius;
const MessageContent(
this.event, {
this.onInfoTab,
super.key,
required this.textColor,
required this.borderRadius,
});
void _verifyOrRequestKey(BuildContext context) async {
@ -111,6 +113,7 @@ class MessageContent extends StatelessWidget {
width: 400,
height: 300,
fit: BoxFit.cover,
borderRadius: borderRadius,
);
case MessageTypes.Sticker:
if (event.redacted) continue textmessage;