From 0aaee82ec7eb1b04c4d45f957a9c74822ecedff9 Mon Sep 17 00:00:00 2001 From: krille-chan Date: Sat, 11 Nov 2023 12:34:55 +0100 Subject: [PATCH] chore: Add border to images in timeline --- lib/pages/chat/events/image_bubble.dart | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/lib/pages/chat/events/image_bubble.dart b/lib/pages/chat/events/image_bubble.dart index 8de5f246..33800a8b 100644 --- a/lib/pages/chat/events/image_bubble.dart +++ b/lib/pages/chat/events/image_bubble.dart @@ -3,6 +3,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_blurhash/flutter_blurhash.dart'; import 'package:matrix/matrix.dart'; +import 'package:fluffychat/config/app_config.dart'; import 'package:fluffychat/pages/image_viewer/image_viewer.dart'; import 'package:fluffychat/widgets/mxc_image.dart'; @@ -79,19 +80,23 @@ class ImageBubble extends StatelessWidget { @override Widget build(BuildContext context) { - return InkWell( - onTap: () => _onTap(context), - child: Hero( - tag: event.eventId, - child: AnimatedSwitcher( - duration: const Duration(seconds: 1), - child: Container( + return Material( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(AppConfig.borderRadius), + side: BorderSide(color: Theme.of(context).dividerColor), + ), + child: InkWell( + onTap: () => _onTap(context), + borderRadius: BorderRadius.circular(AppConfig.borderRadius), + child: Hero( + tag: event.eventId, + child: ConstrainedBox( constraints: maxSize ? BoxConstraints( maxWidth: width, maxHeight: height, ) - : null, + : const BoxConstraints.expand(), child: MxcImage( event: event, width: width,