latestDeviceResult property
Implementation
static Future<Map<String, dynamic>?> get latestDeviceResult async {
try {
final result = await _channel.invokeMethod('getDeviceResult');
latestError = null;
if (result == null) return null;
return _parseMap(result);
} on PlatformException catch (e, s) {
_internalLog("latestDeviceResult failed", e, s);
latestError = ShieldError(
e.code,
e.message ?? e.details?.toString() ?? "Unknown error",
exception: e.details?.toString(),
);
} catch (e, s) {
_internalLog("latestDeviceResult failed", e, s);
latestError = ShieldError(
"0",
e.toString().isNotEmpty
? e.toString()
: (s.toString().isNotEmpty ? s.toString() : "Unknown error"),
);
}
return null;
}