fromMap static method

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

Construct from Map.

Implementation

static InternalLinkTypeAttachmentMenuBot? 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 target_chat = TargetChat.fromMap(_map['target_chat'])!;
  var bot_username = _map['bot_username']! as String;
  var url = _map['url']! as String;
  return InternalLinkTypeAttachmentMenuBot(
    extra: extra,
    clientId: clientId,
    target_chat: target_chat,
    bot_username: bot_username,
    url: url,
  );
}