diff --git a/lib/src/message_widget.dart b/lib/src/message_widget.dart index 94d9afd3..e5fe146f 100644 --- a/lib/src/message_widget.dart +++ b/lib/src/message_widget.dart @@ -227,7 +227,8 @@ class _MessageWidgetState extends State { widget.message.text.characters.every((c) => Emoji.byChar(c) != null); final hasFiles = - widget.message.attachments.any((element) => element.type == 'file'); + widget.message.attachments?.any((element) => element.type == 'file') == + true; return Portal( child: Padding(