class CommentsPost { String? postId; String? commentId; String? comment; String? timestamp; String? commenterId; CommentsPost({ this.postId, this.commentId, this.comment, this.commenterId, this.timestamp, }); factory CommentsPost.fromJSON(Map json) { return CommentsPost( commenterId: json["commenterId"], postId: json["postId"], commentId: json["pommentId"], comment: json["comment"], timestamp: json["timestamp"]); } Map toJson() { final Map data = Map(); data['commenterId'] = this.commenterId; data['postId'] = this.postId; data['commentId'] = this.commentId; data['comment'] = this.comment; data['timestamp'] = this.timestamp; return data; } @override String toString() { return '{"comment":"$comment","commenterId": "$commenterId", "postId": "$postId","commentId":"$commentId","timestamp":"$timestamp"}'; } }