bridgeCall method

Future<Uint8List> bridgeCall(
  1. String name,
  2. Uint8List request
)

Implementation

Future<Uint8List> bridgeCall(String name, Uint8List request) async {
  _counter++;
  var id = _counter.toString();
  var completer = new Completer<Uint8List>();
  completers[id] = completer;
  worker.postMessage({'id': id, 'name': name, 'request': request});
  return completer.future;
}