Comment.fromJson constructor
Comment.fromJson(
- Map<String, dynamic> json
)
Implementation
factory Comment.fromJson(Map<String, dynamic> json) {
return Comment(
commentId: json['CommentId'] as String,
contributor: json['Contributor'] != null
? User.fromJson(json['Contributor'] as Map<String, dynamic>)
: null,
createdTimestamp: timeStampFromJson(json['CreatedTimestamp']),
parentId: json['ParentId'] as String?,
recipientId: json['RecipientId'] as String?,
status: (json['Status'] as String?)?.toCommentStatusType(),
text: json['Text'] as String?,
threadId: json['ThreadId'] as String?,
visibility: (json['Visibility'] as String?)?.toCommentVisibilityType(),
);
}