fix: attachments ui

This commit is contained in:
Deven Joshi
2020-10-26 16:37:43 +05:30
parent f3a9b0939f
commit 8dff93c641
+25 -22
View File
@@ -618,34 +618,37 @@ class MessageInputState extends State<MessageInput> {
return _attachments.isEmpty
? Container()
: LimitedBox(
maxHeight: 80.0,
maxHeight: 76.0,
child: ListView(
scrollDirection: Axis.horizontal,
children: _attachments
.map(
(attachment) => Padding(
padding: const EdgeInsets.all(8.0),
child: ClipRRect(
borderRadius: BorderRadius.circular(10),
child: Stack(
children: <Widget>[
Container(
height: 50,
width: 50,
child: _buildAttachment(attachment),
),
_buildRemoveButton(attachment),
attachment.uploaded
? SizedBox()
: Positioned.fill(
child: Center(
child: Padding(
padding: const EdgeInsets.all(16.0),
child: CircularProgressIndicator(),
(attachment) => AspectRatio(
aspectRatio: 1.0,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: ClipRRect(
borderRadius: BorderRadius.circular(10),
child: Stack(
children: <Widget>[
Container(
height: 50,
width: 50,
child: _buildAttachment(attachment),
),
_buildRemoveButton(attachment),
attachment.uploaded
? SizedBox()
: Positioned.fill(
child: Center(
child: Padding(
padding: const EdgeInsets.all(16.0),
child: CircularProgressIndicator(),
),
),
),
),
],
],
),
),
),
),