findServicesInANetwork static method
Implementation
static Future<List<String>?> findServicesInANetwork(String network,
int startPort, int endPort, int timeout_in_milliseconds) async {
final String? json =
await _channel.invokeMethod('find_all_services', <String, dynamic>{
'network': network,
'startPort': startPort,
'endPort': endPort,
'timeout_in_milliseconds': timeout_in_milliseconds
});
if (json == "" || json == null) {
return null;
}
List<dynamic>? hostList;
try {
hostList = jsonDecode(json);
if (hostList != null) {
return hostList.map((e) => e.toString()).toList();
} else {
return null;
}
} catch (e) {
return null;
}
}