fromMap static method

TargetChatChosen? fromMap(
  1. Map<String, dynamic>? _map
)
override

Construct from Map.

Implementation

static TargetChatChosen? 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 allow_user_chats = _map['allow_user_chats']! as bool;
  var allow_bot_chats = _map['allow_bot_chats']! as bool;
  var allow_group_chats = _map['allow_group_chats']! as bool;
  var allow_channel_chats = _map['allow_channel_chats']! as bool;
  return TargetChatChosen(
    extra: extra,
    clientId: clientId,
    allow_user_chats: allow_user_chats,
    allow_bot_chats: allow_bot_chats,
    allow_group_chats: allow_group_chats,
    allow_channel_chats: allow_channel_chats,
  );
}