fromMap static method

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

Construct from Map.

Implementation

static ChatEventLinkedChatChanged? 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 old_linked_chat_id = _map['old_linked_chat_id']! as int;
  var new_linked_chat_id = _map['new_linked_chat_id']! as int;
  return ChatEventLinkedChatChanged(
    extra: extra,
    clientId: clientId,
    old_linked_chat_id: old_linked_chat_id,
    new_linked_chat_id: new_linked_chat_id,
  );
}