execute<T> method

Future<T> execute<T>(
  1. PcscCommand<T> command
)

Implementation

Future<T> execute<T>(PcscCommand<T> command) async {
  await _isolateReady.future;
  final responsePort = ReceivePort();
  _commandPort!.send(CommandMessage(command, responsePort.sendPort));
  final result = await responsePort.first;
  if (result is Exception) throw result;
  return result as T;
}