From d7aaa9614b9a3253873548a8bdced89dc7d3e987 Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Fri, 8 Jan 2021 14:47:11 +0100 Subject: [PATCH] fix link image size --- lib/src/message_widget.dart | 2 ++ lib/src/url_attachment.dart | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/src/message_widget.dart b/lib/src/message_widget.dart index 1200f38d..2a4ab364 100644 --- a/lib/src/message_widget.dart +++ b/lib/src/message_widget.dart @@ -842,6 +842,8 @@ class _MessageWidgetState extends State { } void onLongPress(BuildContext context) { + print( + 'widget.message.attachment[0].toJson(): ${widget.message.attachments[0].imageUrl}'); if (widget.message.isEphemeral || widget.message.status == MessageSendingStatus.SENDING) { return; diff --git a/lib/src/url_attachment.dart b/lib/src/url_attachment.dart index 1909fc33..130b1109 100644 --- a/lib/src/url_attachment.dart +++ b/lib/src/url_attachment.dart @@ -34,10 +34,10 @@ class UrlAttachment extends StatelessWidget { margin: EdgeInsets.symmetric(horizontal: 8.0), child: Stack( children: [ - Center( - child: CachedNetworkImage( - imageUrl: urlAttachment.imageUrl, - ), + CachedNetworkImage( + width: double.infinity, + imageUrl: urlAttachment.imageUrl, + fit: BoxFit.cover, ), Positioned( left: 0.0,