fromMap static method
override
Construct from Map.
Implementation
static CallStateReady? 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 protocol = CallProtocol.fromMap(_map['protocol'])!;
var servers = List<CallServer>.from(
(_map["servers"] ?? []).map(
(e) => CallServer.fromMap(e),
),
);
var config = _map['config']! as String;
var encryption_key = _map['encryption_key']! as bytes;
var emojis = List<String>.from(
(_map["emojis"] ?? []).map(
(e) => e as String,
),
);
var allow_p2p = _map['allow_p2p']! as bool;
return CallStateReady(
extra: extra,
clientId: clientId,
protocol: protocol,
servers: servers,
config: config,
encryption_key: encryption_key,
emojis: emojis,
allow_p2p: allow_p2p,
);
}