fromMap static method
Implementation
static ServiceInfo fromMap(Map fromChannel) {
Map<String, Uint8List?>? attr;
String name = "";
String type = "";
String hostName = "";
String address = "";
int port = 0;
if (fromChannel.containsKey("attr")) {
attr = Map<String, Uint8List?>.from(fromChannel["attr"]);
}
if (fromChannel.containsKey("name")) {
name = fromChannel["name"];
}
if (fromChannel.containsKey("type")) {
type = fromChannel["type"];
}
if (fromChannel.containsKey("hostName")) {
hostName = fromChannel["hostName"];
}
if (fromChannel.containsKey("address")) {
address = fromChannel["address"];
}
if (fromChannel.containsKey("port")) {
port = fromChannel["port"];
}
return ServiceInfo(attr, name, type, hostName, address, port);
}