fromMap static method

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

Construct from Map.

Implementation

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