ui fix
This commit is contained in:
@@ -18,50 +18,45 @@ class FileAttachment extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Material(
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
//launchURL(context, attachment.assetUrl);
|
||||
},
|
||||
child: Container(
|
||||
width: size?.width ?? 100,
|
||||
margin: trailing != null ? EdgeInsets.only(top: 4.0) : null,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: trailing != null ? BorderRadius.circular(16.0) : null,
|
||||
border: trailing != null
|
||||
? Border.fromBorderSide(BorderSide(color: Color(0xFFE6E6E6)))
|
||||
: null,
|
||||
child: Container(
|
||||
width: size?.width ?? 100,
|
||||
margin: trailing != null ? EdgeInsets.only(top: 4.0) : null,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: trailing != null ? BorderRadius.circular(16.0) : null,
|
||||
border: trailing != null
|
||||
? Border.fromBorderSide(BorderSide(color: Color(0xFFE6E6E6)))
|
||||
: null,
|
||||
),
|
||||
child: ListTile(
|
||||
dense: true,
|
||||
leading: Container(
|
||||
child: _getFileTypeImage(attachment.extraData['mime_type']),
|
||||
height: 40.0,
|
||||
width: 33.33,
|
||||
),
|
||||
child: ListTile(
|
||||
dense: true,
|
||||
leading: Container(
|
||||
child: _getFileTypeImage(attachment.extraData['mime_type']),
|
||||
height: 40.0,
|
||||
width: 33.33,
|
||||
title: Text(
|
||||
attachment?.title ?? 'File',
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
title: Text(
|
||||
attachment?.title ?? 'File',
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
maxLines: 3,
|
||||
maxLines: 3,
|
||||
),
|
||||
subtitle: Text(
|
||||
'${attachment.extraData['file_size'] ?? 'N/A'} bytes',
|
||||
style: TextStyle(
|
||||
color: Colors.black.withOpacity(0.5),
|
||||
),
|
||||
subtitle: Text(
|
||||
'${attachment.extraData['file_size'] ?? 'N/A'} bytes',
|
||||
style: TextStyle(
|
||||
color: Colors.black.withOpacity(0.5),
|
||||
),
|
||||
),
|
||||
trailing: trailing ??
|
||||
IconButton(
|
||||
icon: StreamSvgIcon.cloud_download(
|
||||
color: Colors.black,
|
||||
),
|
||||
onPressed: () {
|
||||
launchURL(context, attachment.assetUrl);
|
||||
},
|
||||
),
|
||||
trailing: trailing ??
|
||||
IconButton(
|
||||
icon: StreamSvgIcon.cloud_download(
|
||||
color: Colors.black,
|
||||
),
|
||||
),
|
||||
onPressed: () {
|
||||
launchURL(context, attachment.assetUrl);
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user