IceCandidate.fromMap constructor

IceCandidate.fromMap(
  1. Map data
)

Implementation

IceCandidate.fromMap(Map data)
    : component = data['component'] ?? 1,
      foundation = data['foundation'],
      // foundation = data['foundation'] is int ? data['foundation'] : data['foundation'].substring(0,3);
      ip = data['ip'],
      port = data['port'],
      priority = data['priority'],
      type = IceCandidateTypeExtension.fromString(data['type']),
      protocol = data['protocol'] != null
          ? ProtocolExtension.fromString(data['protocol'])
          : null,
      tcpType = data['tcpType'] != null
          ? TcpTypeExtension.fromString(data['tcpType'])
          : null,
      transport = data['transport'] ?? 'udp',
      raddr = data['raddr'],
      rport = data['rport'],
      generation = data['generation'],
      networkId = data['network-id'],
      networkCost = data['network-cost'];