Supergroup.fromJson constructor

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

Parse from a json

Implementation

factory Supergroup.fromJson(Map<String, dynamic> json) => Supergroup(
      id: json['id'],
      usernames: json['usernames'] == null
          ? null
          : Usernames.fromJson(json['usernames']),
      date: json['date'],
      status: ChatMemberStatus.fromJson(json['status']),
      memberCount: json['member_count'],
      hasLinkedChat: json['has_linked_chat'],
      hasLocation: json['has_location'],
      signMessages: json['sign_messages'],
      joinToSendMessages: json['join_to_send_messages'],
      joinByRequest: json['join_by_request'],
      isSlowModeEnabled: json['is_slow_mode_enabled'],
      isChannel: json['is_channel'],
      isBroadcastGroup: json['is_broadcast_group'],
      isForum: json['is_forum'],
      isVerified: json['is_verified'],
      restrictionReason: json['restriction_reason'],
      isScam: json['is_scam'],
      isFake: json['is_fake'],
      extra: json['@extra'],
      clientId: json['@client_id'],
    );