fromJson static method
Implementation
static PeamanComment fromJson(final Map<String, dynamic> data) {
return PeamanComment(
id: data['id'],
feedId: data['feed_id'],
ownerId: data['owner_id'],
secondUserId: data['second_user_id'],
secondUserName: data['second_user_name'],
parent: PeamanCommentParent.values[data['parent'] ?? 0],
parentId: data['parent_id'],
parentOwnerId: data['parent_owner_id'],
comment: data['comment'] ?? '',
reactionsCount: data['reactions_count'] ?? 0,
repliesCount: data['replies_count'] ?? 0,
createdAt: data['created_at'],
updatedAt: data['updated_at'],
visibility: data['visibility'] ?? true,
extraData: data,
);
}