fromJson method
Implementation
@override
UThreadViewPostReply fromJson(Map<String, dynamic> json) {
try {
if (isThreadViewPost(json)) {
return UThreadViewPostReply.threadViewPost(
data: const ThreadViewPostConverter().fromJson(json),
);
}
if (isNotFoundPost(json)) {
return UThreadViewPostReply.notFoundPost(
data: const NotFoundPostConverter().fromJson(json),
);
}
if (isBlockedPost(json)) {
return UThreadViewPostReply.blockedPost(
data: const BlockedPostConverter().fromJson(json),
);
}
return UThreadViewPostReply.unknown(data: json);
} catch (_) {
return UThreadViewPostReply.unknown(data: json);
}
}