fromMap static method

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

Construct from Map.

Implementation

static MessageCopyOptions? 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 send_copy = _map['send_copy']! as bool;
  var replace_caption = _map['replace_caption']! as bool;
  var new_caption = FormattedText.fromMap(_map['new_caption']);
  return MessageCopyOptions(
    extra: extra,
    clientId: clientId,
    send_copy: send_copy,
    replace_caption: replace_caption,
    new_caption: new_caption,
  );
}