responseFactory method
Deserializes the JSON response into the expected type.
Implementation
@override
GetPostResponse responseFactory(Map<String, dynamic> json) {
if (json.containsKey('post_view')) {
return GetPostResponse.fromJson(json['post_view'] as Map<String, dynamic>);
}
return GetPostResponse.fromJson(json);
}