SupergroupFullInfo.fromJson constructor

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

Parse from a json

Implementation

factory SupergroupFullInfo.fromJson(Map<String, dynamic> json) => SupergroupFullInfo(
  photo: json['photo'] == null ? null : ChatPhoto.fromJson(json['photo']),
  description: json['description'],
  memberCount: json['member_count'],
  administratorCount: json['administrator_count'],
  restrictedCount: json['restricted_count'],
  bannedCount: json['banned_count'],
  linkedChatId: json['linked_chat_id'] ?? 0,
  slowModeDelay: json['slow_mode_delay'],
  slowModeDelayExpiresIn: json['slow_mode_delay_expires_in'],
  canGetMembers: json['can_get_members'],
  canSetUsername: json['can_set_username'],
  canSetStickerSet: json['can_set_sticker_set'],
  canSetLocation: json['can_set_location'],
  canGetStatistics: json['can_get_statistics'],
  isAllHistoryAvailable: json['is_all_history_available'],
  stickerSetId: int.tryParse(json['sticker_set_id'] ?? "") ?? 0,
  location: json['location'] == null ? null : ChatLocation.fromJson(json['location']),
  inviteLink: json['invite_link'] == null ? null : ChatInviteLink.fromJson(json['invite_link']),
  botCommands: List<BotCommands>.from((json['bot_commands'] ?? []).map((item) => BotCommands.fromJson(item)).toList()),
  upgradedFromBasicGroupId: json['upgraded_from_basic_group_id'] ?? 0,
  upgradedFromMaxMessageId: json['upgraded_from_max_message_id'] ?? 0,
  extra: json['@extra'],
  clientId: json['@client_id'],
);