ZIMConversation.fromMap constructor
ZIMConversation.fromMap(
- Map map
Implementation
ZIMConversation.fromMap(Map<dynamic, dynamic> map)
: conversationID = map['conversationID']!,
type =
ZIMConversationTypeExtension.mapValue[map['type']] ??
ZIMConversationType.unknown,
conversationName = map['conversationName']!,
conversationAvatarUrl = map['conversationAvatarUrl']!,
conversationAlias = map['conversationAlias']!,
notificationStatus =
ZIMConversationNotificationStatusExtension
.mapValue[map['notificationStatus']] ??
ZIMConversationNotificationStatus.notify,
unreadMessageCount = map['unreadMessageCount']!,
lastMessage = (map['lastMessage'] != null)
? ZIMDataUtils.parseZIMMessageFromMap(map['lastMessage'])
: null,
orderKey = map['orderKey']!,
isPinned = map['isPinned']!,
pinnedTime = map['pinnedTime']!,
mentionedInfoList = ((map['mentionedInfoList']!) as List)
.map<ZIMMessageMentionedInfo>(
(item) => ZIMMessageMentionedInfo.fromMap(item),
)
.toList(),
draft = map['draft']!,
marks = ((map['marks']!) as List)
.map<int>((item) => item as int)
.toList(),
readMessageSeq = map['readMessageSeq']!,
isConversationDisabled = map['isConversationDisabled']!,
selfMutedExpiredTime = map['selfMutedExpiredTime']!,
messageDestructDuration = map['messageDestructDuration']!;