You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

38 lines
1008 B

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<String, dynamic> json) {
return CommentsPost(
commenterId: json["commenterId"],
postId: json["postId"],
commentId: json["pommentId"],
comment: json["comment"],
timestamp: json["timestamp"]);
}
Map<dynamic, dynamic> toJson() {
final Map<dynamic, dynamic> data = Map<dynamic, dynamic>();
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"}';
}
}