getDeviceThreatRecommendation method
get deviceRecommendation from :device node
@param option language as string @param threat object @return list of threatRecommendation objectImplementation
Future<List<Recommendation>> getDeviceThreatRecommendation(
{String language: "en"}) async {
Device currentDevice = await getDeviceInfo;
try {
_node = await _storageController
.get(":Devices:${currentDevice.deviceId}:gi:data:recommendations");
String threatRecommendations = await _node!
.getValue("deviceRecommendations")
.then((value) => value!.getValue(language).toString());
return Recommendation.convertFromJSon(threatRecommendations);
} on StorageException {
throw Exception("NODE NOT FOUND");
}
}