From 38687f59efedf88a6dca225ad85594636dd6871f Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Thu, 3 Dec 2020 11:32:59 +0100 Subject: [PATCH] add cliprrect to file section of messageinput --- lib/src/message_input.dart | 46 +++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/lib/src/message_input.dart b/lib/src/message_input.dart index 3ebcef21..1469e574 100644 --- a/lib/src/message_input.dart +++ b/lib/src/message_input.dart @@ -1247,29 +1247,33 @@ class MessageInputState extends State { .map( (e) => Padding( padding: - const EdgeInsets.symmetric(horizontal: 4.0), - child: FileAttachment( - attachment: e.attachment, - size: Size( - MediaQuery.of(context).size.width * 0.55, - MediaQuery.of(context).size.height * 0.3, - ), - trailing: Padding( - padding: const EdgeInsets.all(8.0), - child: InkWell( - child: CircleAvatar( - backgroundColor: - Colors.black.withOpacity(0.2), - maxRadius: 12.0, - child: StreamSvgIcon.close( - color: Colors.white, + const EdgeInsets.symmetric(horizontal: 8.0), + child: ClipRRect( + borderRadius: BorderRadius.circular(10), + clipBehavior: Clip.antiAlias, + child: FileAttachment( + attachment: e.attachment, + size: Size( + MediaQuery.of(context).size.width * 0.55, + MediaQuery.of(context).size.height * 0.3, + ), + trailing: Padding( + padding: const EdgeInsets.all(8.0), + child: InkWell( + child: CircleAvatar( + backgroundColor: + Colors.black.withOpacity(0.2), + maxRadius: 12.0, + child: StreamSvgIcon.close( + color: Colors.white, + ), ), + onTap: () { + setState(() { + _attachments.remove(e); + }); + }, ), - onTap: () { - setState(() { - _attachments.remove(e); - }); - }, ), ), ),