[FileAttachment] Fix trailing icon padding and minor fixes
Signed-off-by: Sahil Kumar <[email protected]>
This commit is contained in:
@@ -72,6 +72,7 @@ class _FileAttachmentState extends State<FileAttachment> {
|
|||||||
: null,
|
: null,
|
||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
child: _getFileTypeImage(),
|
child: _getFileTypeImage(),
|
||||||
@@ -79,9 +80,7 @@ class _FileAttachmentState extends State<FileAttachment> {
|
|||||||
width: 33.33,
|
width: 33.33,
|
||||||
margin: EdgeInsets.all(8.0),
|
margin: EdgeInsets.all(8.0),
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(width: 8.0),
|
||||||
width: 6.0,
|
|
||||||
),
|
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
@@ -93,32 +92,36 @@ class _FileAttachmentState extends State<FileAttachment> {
|
|||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(height: 3.0),
|
||||||
height: 3.0,
|
|
||||||
),
|
|
||||||
Text(
|
Text(
|
||||||
'${getSizeText(widget.attachment.extraData['file_size'])}',
|
'${getSizeText(widget.attachment.extraData['file_size'])}',
|
||||||
style: StreamChatTheme.of(context).textTheme.body.copyWith(
|
style: StreamChatTheme.of(context)
|
||||||
color: StreamChatTheme.of(context)
|
.textTheme
|
||||||
.colorTheme
|
.footnote
|
||||||
.black
|
.copyWith(
|
||||||
.withOpacity(0.5)),
|
color: StreamChatTheme.of(context)
|
||||||
|
.colorTheme
|
||||||
|
.black
|
||||||
|
.withOpacity(0.5)),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Column(
|
SizedBox(width: 8.0),
|
||||||
children: [
|
Material(
|
||||||
widget.trailing ??
|
type: MaterialType.transparency,
|
||||||
IconButton(
|
child: widget.trailing ??
|
||||||
icon: StreamSvgIcon.cloud_download(
|
IconButton(
|
||||||
color: StreamChatTheme.of(context).colorTheme.black,
|
icon: StreamSvgIcon.cloud_download(
|
||||||
),
|
color: StreamChatTheme.of(context).colorTheme.black,
|
||||||
onPressed: () {
|
|
||||||
launchURL(context, widget.attachment.assetUrl);
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
],
|
padding: const EdgeInsets.all(8),
|
||||||
|
visualDensity: VisualDensity.compact,
|
||||||
|
splashRadius: 16,
|
||||||
|
onPressed: () {
|
||||||
|
launchURL(context, widget.attachment.assetUrl);
|
||||||
|
},
|
||||||
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user