fromJson method
Implementation
@override
UConvoViewLastMessage fromJson(Map<String, dynamic> json) {
try {
if (isMessageView(json)) {
return UConvoViewLastMessage.messageView(
data: const MessageViewConverter().fromJson(json),
);
}
if (isDeletedMessageView(json)) {
return UConvoViewLastMessage.deletedMessageView(
data: const DeletedMessageViewConverter().fromJson(json),
);
}
return UConvoViewLastMessage.unknown(data: json);
} catch (_) {
return UConvoViewLastMessage.unknown(data: json);
}
}