error property
Future<AgentError?>
error
Implementation
Future<AgentError?> get error async {
if (_isolate == null) {
throw StateError('Agent has been killed.');
}
ReceivePort receivePort = ReceivePort();
_sendPort
.send(_Command(_Commands.getError, sendPort: receivePort.sendPort));
dynamic value = await receivePort.first;
return value as AgentError?;
}