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