MdGroupChannel.fromJson constructor

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

Implementation

factory MdGroupChannel.fromJson(final Map<String, dynamic> json) =>
    MdGroupChannel(
      name: json["name"] as String?,
      coverUrl: json["cover_url"] as String?,
      channelUrl: json["channel_url"] as String?,
      customType: json["custom_type"] as String?,
      isDistinct: json["is_distinct"] as bool? ?? false,
      isPublic: json["is_public"] as bool? ?? false,
      isEphemeral: json["is_ephemeral"] as bool? ?? false,
      data: json["data"] as String?,
      isCreated: json["is_created"] as bool? ?? false,
      isDiscoverable: json["is_discoverable"] as bool? ?? false,
      isSuper: json["is_super"] as bool? ?? false,
      freeze: json["freeze"] as bool? ?? false,
      memberCount: json["member_count"] as int?,
      joinedMemberCount: json["joined_member_count"] as int?,
      maxLengthMessage: json["max_length_message"] as int?,
      createdAt: json["created_at"] as int?,
      operators: json["operators"] == null
          ? null
          : List<Operator>.from(json["operators"]
                  .map((x) => Operator.fromJson(x as Map<String, dynamic>))
              as Iterable<dynamic>),
      members: json["members"] == null
          ? null
          : List<Member>.from(json["members"]
                  .map((x) => Member.fromJson(x as Map<String, dynamic>))
              as Iterable<dynamic>),
      uuid: json["uuid"] as String?,
      active: json["active"] as bool? ?? false,
      createdTs: json["created_ts"] as String?,
      updatedTs: json["updated_ts"] as String?,
      createdBy: json["created_by"] as String?,
      updatedBy: json["updated_by"] as String?,
      communityId: json["community_id"] as String?,
    );