fromMap static method

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

Construct from Map.

Implementation

static CallServerTypeWebrtc? 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 username = _map['username']! as String;
  var password = _map['password']! as String;
  var supports_turn = _map['supports_turn']! as bool;
  var supports_stun = _map['supports_stun']! as bool;
  return CallServerTypeWebrtc(
    extra: extra,
    clientId: clientId,
    username: username,
    password: password,
    supports_turn: supports_turn,
    supports_stun: supports_stun,
  );
}