fix: attachments ui

This commit is contained in:
Deven Joshi
2020-10-26 16:43:38 +05:30
parent 8dff93c641
commit b93a450c76
+6 -6
View File
@@ -255,7 +255,7 @@ class MessageInputState extends State<MessageInput> {
maxHeight: widget.maxHeight, maxHeight: widget.maxHeight,
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16.0), borderRadius: BorderRadius.circular(32.0),
border: Border.all( border: Border.all(
color: Colors.grey, color: Colors.grey,
)), )),
@@ -623,19 +623,20 @@ class MessageInputState extends State<MessageInput> {
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
children: _attachments children: _attachments
.map( .map(
(attachment) => AspectRatio( (attachment) => Padding(
aspectRatio: 1.0,
child: Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: ClipRRect( child: ClipRRect(
borderRadius: BorderRadius.circular(10), borderRadius: BorderRadius.circular(10),
child: Stack( child: Stack(
children: <Widget>[ children: <Widget>[
Container( AspectRatio(
aspectRatio: 1.0,
child: Container(
height: 50, height: 50,
width: 50, width: 50,
child: _buildAttachment(attachment), child: _buildAttachment(attachment),
), ),
),
_buildRemoveButton(attachment), _buildRemoveButton(attachment),
attachment.uploaded attachment.uploaded
? SizedBox() ? SizedBox()
@@ -651,7 +652,6 @@ class MessageInputState extends State<MessageInput> {
), ),
), ),
), ),
),
) )
.toList(), .toList(),
), ),