fromJson static method
Implementation
static Supergroup? fromJson(Map<String, dynamic>? json) {
if (json == null) {
return null;
}
return Supergroup(
id: (json['id'] as int?) ?? 0,
usernames: Usernames.fromJson(tdMapFromJson(json['usernames'])),
date: (json['date'] as int?) ?? 0,
status: ChatMemberStatus.fromJson(tdMapFromJson(json['status'])),
memberCount: (json['member_count'] as int?) ?? 0,
boostLevel: (json['boost_level'] as int?) ?? 0,
hasAutomaticTranslation:
(json['has_automatic_translation'] as bool?) ?? false,
hasLinkedChat: (json['has_linked_chat'] as bool?) ?? false,
hasLocation: (json['has_location'] as bool?) ?? false,
signMessages: (json['sign_messages'] as bool?) ?? false,
showMessageSender: (json['show_message_sender'] as bool?) ?? false,
joinToSendMessages: (json['join_to_send_messages'] as bool?) ?? false,
joinByRequest: (json['join_by_request'] as bool?) ?? false,
isSlowModeEnabled: (json['is_slow_mode_enabled'] as bool?) ?? false,
isChannel: (json['is_channel'] as bool?) ?? false,
isBroadcastGroup: (json['is_broadcast_group'] as bool?) ?? false,
isForum: (json['is_forum'] as bool?) ?? false,
isDirectMessagesGroup:
(json['is_direct_messages_group'] as bool?) ?? false,
isAdministeredDirectMessagesGroup:
(json['is_administered_direct_messages_group'] as bool?) ?? false,
verificationStatus: VerificationStatus.fromJson(
tdMapFromJson(json['verification_status']),
),
hasDirectMessagesGroup:
(json['has_direct_messages_group'] as bool?) ?? false,
hasForumTabs: (json['has_forum_tabs'] as bool?) ?? false,
restrictionInfo: RestrictionInfo.fromJson(
tdMapFromJson(json['restriction_info']),
),
paidMessageStarCount: (json['paid_message_star_count'] as int?) ?? 0,
activeStoryState: ActiveStoryState.fromJson(
tdMapFromJson(json['active_story_state']),
),
);
}