latestDeviceResult property

Future<Map<String, dynamic>?> get latestDeviceResult

Implementation

static Future<Map<String, dynamic>?> get latestDeviceResult async {
  var result = "";
  try {
    result = await _channel.invokeMethod('getDeviceResult');
    latestError = null;
    return json.decode(result);
  } on PlatformException catch (e) {
    latestError =
        ShieldError(int.parse(e.code), e.message ?? "Unknown error");
  } catch (_) {
    latestError = ShieldError(0, "Unknown error");
  }
  return null;
}