scanResults method
Implementation
void scanResults(Function(bool isCompleted) callback) {
String api = "$searchScanResult$jobId";
UnitsForNetwork.getHttpForDevice(api, parameters: {}, onSuccess: (res) {
if (res["status"] == 'COMPLETE') {
Navigator.pop(currentContext!);
Map map = res["_links"]["enclosure"];
locPath = map["href"];
callback(true);
} else {
callback(false);
}
});
}