fromMap static method
override
Construct from Map.
Implementation
static SupergroupFullInfo? fromMap(Map<String, dynamic>? _map) {
if (_map == null) return null;
var _ = _map["@type"];
if (_ != CONSTRUCTOR) return null;
var extra = _map['@extra'];
var clientId = _map['@clientId'];
var photo = ChatPhoto.fromMap(_map['photo']);
var description = _map['description']! as String;
var member_count = _map['member_count']! as int;
var administrator_count = _map['administrator_count']! as int;
var restricted_count = _map['restricted_count']! as int;
var banned_count = _map['banned_count']! as int;
var linked_chat_id = _map['linked_chat_id']! as int;
var slow_mode_delay = _map['slow_mode_delay']! as int;
var slow_mode_delay_expires_in =
_map['slow_mode_delay_expires_in']! as double;
var can_get_members = _map['can_get_members']! as bool;
var has_hidden_members = _map['has_hidden_members']! as bool;
var can_hide_members = _map['can_hide_members']! as bool;
var can_set_sticker_set = _map['can_set_sticker_set']! as bool;
var can_set_location = _map['can_set_location']! as bool;
var can_get_statistics = _map['can_get_statistics']! as bool;
var can_toggle_aggressive_anti_spam =
_map['can_toggle_aggressive_anti_spam']! as bool;
var is_all_history_available = _map['is_all_history_available']! as bool;
var has_aggressive_anti_spam_enabled =
_map['has_aggressive_anti_spam_enabled']! as bool;
var has_pinned_stories = _map['has_pinned_stories']! as bool;
var sticker_set_id = _map['sticker_set_id']! as int64;
var location = ChatLocation.fromMap(_map['location']);
var invite_link = ChatInviteLink.fromMap(_map['invite_link']);
var bot_commands = List<BotCommands>.from(
(_map["bot_commands"] ?? []).map(
(e) => BotCommands.fromMap(e),
),
);
var upgraded_from_basic_group_id =
_map['upgraded_from_basic_group_id']! as int;
var upgraded_from_max_message_id =
_map['upgraded_from_max_message_id']! as int;
return SupergroupFullInfo(
extra: extra,
clientId: clientId,
photo: photo,
description: description,
member_count: member_count,
administrator_count: administrator_count,
restricted_count: restricted_count,
banned_count: banned_count,
linked_chat_id: linked_chat_id,
slow_mode_delay: slow_mode_delay,
slow_mode_delay_expires_in: slow_mode_delay_expires_in,
can_get_members: can_get_members,
has_hidden_members: has_hidden_members,
can_hide_members: can_hide_members,
can_set_sticker_set: can_set_sticker_set,
can_set_location: can_set_location,
can_get_statistics: can_get_statistics,
can_toggle_aggressive_anti_spam: can_toggle_aggressive_anti_spam,
is_all_history_available: is_all_history_available,
has_aggressive_anti_spam_enabled: has_aggressive_anti_spam_enabled,
has_pinned_stories: has_pinned_stories,
sticker_set_id: sticker_set_id,
location: location,
invite_link: invite_link,
bot_commands: bot_commands,
upgraded_from_basic_group_id: upgraded_from_basic_group_id,
upgraded_from_max_message_id: upgraded_from_max_message_id,
);
}