NIMTeamNotificationAttachment.createTeamNotificationAttachment constructor
Null safety
NIMTeamNotificationAttachment.createTeamNotificationAttachment(- Map<String, dynamic> map
)
Implementation
factory NIMTeamNotificationAttachment.createTeamNotificationAttachment(
Map<String, dynamic> map) {
final int type = map['type'] as int;
switch (type) {
case NIMTeamNotificationTypes.acceptInvite:
case NIMTeamNotificationTypes.inviteMember:
case NIMTeamNotificationTypes.addTeamManager:
case NIMTeamNotificationTypes.kickMember:
case NIMTeamNotificationTypes.transferOwner:
case NIMTeamNotificationTypes.passTeamApply:
case NIMTeamNotificationTypes.removeTeamManager:
return NIMMemberChangeAttachment.fromMap(map);
case NIMTeamNotificationTypes.dismissTeam:
return NIMDismissAttachment.fromMap(map);
case NIMTeamNotificationTypes.leaveTeam:
return NIMLeaveTeamAttachment.fromMap(map);
case NIMTeamNotificationTypes.muteTeamMember:
return NIMMuteMemberAttachment.fromMap(map);
case NIMTeamNotificationTypes.updateTeam:
return NIMUpdateTeamAttachment.fromMap(map);
default:
return NIMTeamNotificationAttachment.fromMap(map);
}
}