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