🐛 Fix fileType render error

This commit is contained in:
LittleSheep 2024-09-17 18:28:53 +08:00
parent e4b741ff0c
commit d2f37ae45d

View File

@ -484,7 +484,7 @@ class _AttachmentEditorPopupState extends State<AttachmentEditorPopup> {
),
),
Text(
'${fileType[0].toUpperCase()}${fileType.substring(1)} · ${element.size.formatBytes()}',
'${fileType.isNotEmpty ? fileType.capitalize : 'unknown'.tr} · ${element.size.formatBytes()}',
style: const TextStyle(fontSize: 12),
),
],