getDisplayName static method
Implementation
static String getDisplayName(V2TimMessage message) {
final friendRemark = message.friendRemark ?? "";
final nameCard = message.nameCard ?? "";
final nickName = message.nickName ?? "";
final sender = message.sender ?? "";
final displayName = friendRemark.isNotEmpty
? friendRemark
: nameCard.isNotEmpty
? nameCard
: nickName.isNotEmpty
? nickName
: sender;
return displayName.toString();
}