diff --git a/packages/stream_chat/lib/src/core/models/user.dart b/packages/stream_chat/lib/src/core/models/user.dart index ff435f67b..d97d009cf 100644 --- a/packages/stream_chat/lib/src/core/models/user.dart +++ b/packages/stream_chat/lib/src/core/models/user.dart @@ -82,7 +82,7 @@ class User extends Equatable { /// {@macro name} @JsonKey(ignore: true) String get name { - if (extraData.containsKey('name')) { + if (extraData.containsKey('name') && extraData['name'] != null) { final name = extraData['name']! as String; if (name.isNotEmpty) return name; }