fromMap static method

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

Construct from Map.

Implementation

static MessageLinkInfo? 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 is_public = _map['is_public']! as bool;
  var chat_id = _map['chat_id']! as int;
  var message_thread_id = _map['message_thread_id']! as int;
  var message = Message.fromMap(_map['message']);
  var media_timestamp = _map['media_timestamp']! as int;
  var for_album = _map['for_album']! as bool;
  return MessageLinkInfo(
    extra: extra,
    clientId: clientId,
    is_public: is_public,
    chat_id: chat_id,
    message_thread_id: message_thread_id,
    message: message,
    media_timestamp: media_timestamp,
    for_album: for_album,
  );
}