getAvailableDevices static method
Lists all available devices that Leopard can use for inference.
Entries in the list can be used as the device argument when initializing Leopard.
Throws a LeopardException if unable to get devices
returns a list of devices Leopard can run inference on
Implementation
static Future<List<String>> getAvailableDevices() async {
try {
List<String> devices = (await _channel
.invokeMethod(_NativeFunctions.GET_AVAILABLE_DEVICES.name, {}))
.cast<String>();
return devices;
} on PlatformException catch (error) {
throw leopardStatusToException(error.code, error.message);
} on Exception catch (error) {
throw leopardStatusToException("LeopardException", error.toString());
}
}