create method Null safety

Future<AsyncProcessingBlock> create(
  1. Pointer<Void> implementation,
  2. String facerecConfDir,
  3. String dllPath,
  4. Map context
)

Implementation

static Future<AsyncProcessingBlock> create(Pointer<Void> implementation, String facerecConfDir, String dllPath, Map context) async {
  ReceivePort receivePort = ReceivePort();

  Isolate isolate = await Isolate.spawn(_isolateImplementation,
      {"implementation": implementation.address, "facerecConfDir": facerecConfDir, "dllPath": dllPath, "sendPort": receivePort.sendPort, "context": context});

  SendPort sendPort = await receivePort.first;

  return AsyncProcessingBlock._create(isolate, sendPort);
}