displayName property
String
get
displayName
Implementation
String get displayName {
if (name != null && name!.isNotEmpty) return name!;
if (isDirect && participants.isNotEmpty) {
final other = participants.firstWhere(
(p) => p.userId != myUserId,
orElse: () => participants.first,
);
return other.displayName;
}
return 'Chat';
}