HashtagPostsModel.fromJson constructor

HashtagPostsModel.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory HashtagPostsModel.fromJson(Map<String, dynamic> json) {
  PostModel post = PostModel.fromJson(json["post"]);
  HashtagModel tag = HashtagModel.fromJson(json["tag"]);

  return new HashtagPostsModel(
    id: json['id'],
    tag: tag,
    post: post,
  );
}