fromMap static method
override
Construct from Map.
Implementation
static ForwardMessages? 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 chat_id = _map['chat_id']! as int;
var message_thread_id = _map['message_thread_id']! as int;
var from_chat_id = _map['from_chat_id']! as int;
var message_ids = List<int>.from(
(_map["message_ids"] ?? []).map(
(e) => e as int,
),
);
var options = MessageSendOptions.fromMap(_map['options']);
var send_copy = _map['send_copy']! as bool;
var remove_caption = _map['remove_caption']! as bool;
var only_preview = _map['only_preview']! as bool;
return ForwardMessages(
extra: extra,
clientId: clientId,
chat_id: chat_id,
message_thread_id: message_thread_id,
from_chat_id: from_chat_id,
message_ids: message_ids,
options: options,
send_copy: send_copy,
remove_caption: remove_caption,
only_preview: only_preview,
);
}