CommentActivityModel.fromJson constructor
CommentActivityModel.fromJson(
- Map<String, dynamic> json
)
Implementation
factory CommentActivityModel.fromJson(Map<String, dynamic> json) => CommentActivityModel(
id: json["_id"] ?? '',
type: json["_type"] ?? '',
activityCount: json["activity_count"] ?? 0,
atype: json["atype"] ?? '',
category: json["category"]?.toString() ?? '',
moderation: json["moderation"] ?? '',
points: json["points"] ?? 0,
state: json["state"] ?? '',
createdAt: json["created_at"] ?? 0,
module: json["module"] ?? '',
name: json["name"] ?? '',
team: json["team"],
participant: Participant.fromJson(json["participant"]),
votesCount: json["votes_count"] ?? 0,
tags: json["tags"] != null ? List<String>.from(json["tags"].map((x) => x.toString())) : [],
participantsTags: json["participants_tags"] != null
? List<String>.from(json["participants_tags"].map((x) => x.toString()))
: [],
pushRedirectUrl: json["push_redirect_url"],
);