fromJson method
Implementation
@override
UThreadViewPostReplies fromJson(Map<String, dynamic> json) {
try {
if (ThreadViewPost.validate(json)) {
return UThreadViewPostReplies.threadViewPost(
data: const ThreadViewPostConverter().fromJson(json),
);
}
if (NotFoundPost.validate(json)) {
return UThreadViewPostReplies.notFoundPost(
data: const NotFoundPostConverter().fromJson(json),
);
}
if (BlockedPost.validate(json)) {
return UThreadViewPostReplies.blockedPost(
data: const BlockedPostConverter().fromJson(json),
);
}
return UThreadViewPostReplies.unknown(data: json);
} catch (_) {
return UThreadViewPostReplies.unknown(data: json);
}
}