fix: attachments ui
This commit is contained in:
+25
-22
@@ -618,34 +618,37 @@ class MessageInputState extends State<MessageInput> {
|
|||||||
return _attachments.isEmpty
|
return _attachments.isEmpty
|
||||||
? Container()
|
? Container()
|
||||||
: LimitedBox(
|
: LimitedBox(
|
||||||
maxHeight: 80.0,
|
maxHeight: 76.0,
|
||||||
child: ListView(
|
child: ListView(
|
||||||
scrollDirection: Axis.horizontal,
|
scrollDirection: Axis.horizontal,
|
||||||
children: _attachments
|
children: _attachments
|
||||||
.map(
|
.map(
|
||||||
(attachment) => Padding(
|
(attachment) => AspectRatio(
|
||||||
padding: const EdgeInsets.all(8.0),
|
aspectRatio: 1.0,
|
||||||
child: ClipRRect(
|
child: Padding(
|
||||||
borderRadius: BorderRadius.circular(10),
|
padding: const EdgeInsets.all(8.0),
|
||||||
child: Stack(
|
child: ClipRRect(
|
||||||
children: <Widget>[
|
borderRadius: BorderRadius.circular(10),
|
||||||
Container(
|
child: Stack(
|
||||||
height: 50,
|
children: <Widget>[
|
||||||
width: 50,
|
Container(
|
||||||
child: _buildAttachment(attachment),
|
height: 50,
|
||||||
),
|
width: 50,
|
||||||
_buildRemoveButton(attachment),
|
child: _buildAttachment(attachment),
|
||||||
attachment.uploaded
|
),
|
||||||
? SizedBox()
|
_buildRemoveButton(attachment),
|
||||||
: Positioned.fill(
|
attachment.uploaded
|
||||||
child: Center(
|
? SizedBox()
|
||||||
child: Padding(
|
: Positioned.fill(
|
||||||
padding: const EdgeInsets.all(16.0),
|
child: Center(
|
||||||
child: CircularProgressIndicator(),
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(16.0),
|
||||||
|
child: CircularProgressIndicator(),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user