FeedsDatum.fromJson constructor

FeedsDatum.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory FeedsDatum.fromJson(Map<String, dynamic> json) => FeedsDatum(
      feedsDatumCreatedAt: json["created_at"],
      createdAt: json["createdAt"],
      updatedAt: json["updatedAt"],
      id: json["id"],
      userId: json["user_id"],
      message: json["message"],
      tags: json["tags"] == null
          ? []
          : List<Tag>.from(json["tags"]!.map((x) => Tag.fromJson(x))),
      urgencyId: json["urgency_id"],
      expiry: json["expiry"],
      bountyStatus: json["bounty_status"],
      suggestedUsers: json["suggested_users"] == null
          ? []
          : List<SuggestedUser>.from(
              json["suggested_users"]!.map((x) => SuggestedUser.fromJson(x))),
      suggestedTags: json["suggested_tags"] == null
          ? []
          : List<Tag>.from(
              json["suggested_tags"]!.map((x) => Tag.fromJson(x))),
      lastAnswered: json["last_answered"],
      publishedAt: json["published_at"],
      newAnswer: json["new_answer"],
      communityOnly: json["community_only"],
      hunters: json["hunters"] == null
          ? []
          : List<Hunter>.from(
              json["hunters"]!.map((x) => Hunter.fromJson(x))),
      user: json["user"] == null ? null : User.fromJson(json["user"]),
      bountyCommunityMaps: json["bountyCommunityMaps"] == null
          ? []
          : List<BountyCommunityMap>.from(json["bountyCommunityMaps"]!
              .map((x) => BountyCommunityMap.fromJson(x))),
    );