fromMap static method
override
Construct from Map.
Implementation
static SecretChat? 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 id = _map['id']! as int;
var user_id = _map['user_id']! as int;
var state = SecretChatState.fromMap(_map['state'])!;
var is_outbound = _map['is_outbound']! as bool;
var key_hash = _map['key_hash']! as bytes;
var layer = _map['layer']! as int;
return SecretChat(
extra: extra,
clientId: clientId,
id: id,
user_id: user_id,
state: state,
is_outbound: is_outbound,
key_hash: key_hash,
layer: layer,
);
}