fromMap static method

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

Construct from Map.

Implementation

static MessageForwardInfo? 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 origin = MessageForwardOrigin.fromMap(_map['origin'])!;
  var date = _map['date']! as int;
  var public_service_announcement_type =
      _map['public_service_announcement_type']! as String;
  var from_chat_id = _map['from_chat_id']! as int;
  var from_message_id = _map['from_message_id']! as int;
  return MessageForwardInfo(
    extra: extra,
    clientId: clientId,
    origin: origin,
    date: date,
    public_service_announcement_type: public_service_announcement_type,
    from_chat_id: from_chat_id,
    from_message_id: from_message_id,
  );
}