ReplyCommentModel.fromJson constructor

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

Implementation

factory ReplyCommentModel.fromJson(Map<String, dynamic> json) {
  UserModel user = UserModel.fromJson(json["user"]);
  PostCommentModel postComments = PostCommentModel.fromJson(json["postComments"]);

  return new ReplyCommentModel(
    id: json['id'],
    user: user,
    postComments: postComments,
    createdAt: DateTime.parse(json['createdAt'] as String),
    comment: json['comment'].toString(),
  );
}