findServicesInAHost static method
Implementation
static Future<List<String>?> findServicesInAHost(String host, int startPort,
int endPort, int timeout_in_milliseconds) async {
final String? json = await _channel
.invokeMethod('find_services_in_a_host', <String, dynamic>{
'host': host,
'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;
}
}