Community.fromJson constructor

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

Implementation

factory Community.fromJson(final Map<String, dynamic> json) => Community(
      uuid: json["uuid"] as String?,
      createdTs: json["createdTS"] as String?,
      updatedTs: json["updatedTS"] as String?,
      createdBy: json["createdBy"] as String?,
      updatedBy: json["updatedBy"] as String?,
      version: json["version"] as int?,
      id: json["id"] as String?,
      accountId: json["accountId"] as int?,
      name: json["name"] as String?,
      description: json["description"] as String?,
      sect: json["sect"] as String?,
      handle: json["handle"] as String?,
      communityType: json["communityType"] as String?,
      location: json["location"] == null
          ? null
          : Location.fromJson(json["location"] as Map<String, dynamic>),
      webSiteUrl: json["webSiteUrl"] as String?,
      links: json["links"] == null
          ? null
          : UserLinks.fromJson(json["links"] as Map<String, dynamic>),
      operatingSchedule: json["operatingSchedule"] == null
          ? null
          : OperatingSchedule.fromJson(
              json["operatingSchedule"] as Map<String, dynamic>),
      contactPoints: json["contactPoints"] == null
          ? null
          : List<ContactPoint>.from(json["contactPoints"].map((final x) =>
                  ContactPoint.fromJson(x as Map<String, dynamic>))
              as Iterable<dynamic>),
      facilities: json["facilities"] == null
          ? null
          : List<Facility>.from(json["facilities"].map(
                  (final x) => Facility.fromJson(x as Map<String, dynamic>))
              as Iterable<dynamic>),
      status: json["status"] as String?,
      contentVisibilityType: json["contentVisibilityType"] as String?,
      settings: json["settings"] == null
          ? null
          : List<Setting>.from(json["settings"].map(
                  (final x) => Setting.fromJson(x as Map<String, dynamic>))
              as Iterable<dynamic>),
      media: json["media"] == null
          ? null
          : CoverMedia.fromJson(json["media"] as Map<String, dynamic>),
      eligibility: json["eligibility"] == null
          ? null
          : UserEligibility.fromJson(
              json["eligibility"] as Map<String, dynamic>),
      hidden: json["hidden"] as bool?,
      business: json["business"] as bool?,
      verified: json["verified"] as bool?,
      premium: json["premium"] as bool?,
      active: json["active"] as bool?,
      creationSourceType: json["creationSourceType"] as String?,
      rangeMembersCount: json["rangeMembersCount"] as int?,
      tags: json["tags"] == null
          ? null
          : List<Tag>.from(json["tags"]
                  .map((final x) => Tag.fromJson(x as Map<String, dynamic>))
              as Iterable<dynamic>),
    );