create method Null safety

Future<AsyncCapturer> create(
  1. Pointer<Void> implementation,
  2. String facerecConfDir,
  3. String dllPath,
  4. Config config
)

Implementation

static Future<AsyncCapturer> create(Pointer<Void> implementation, String facerecConfDir, String dllPath, Config config) async {
  ReceivePort receivePort = ReceivePort();

  Isolate isolate = await Isolate.spawn(_isolateImplementation, {
    "implementation": implementation.address,
    "facerecConfDir": facerecConfDir,
    "dllPath": dllPath,
    "configFilepath": config._configFilepath,
    "overriddenParams": config._overriddenParams,
    "sendPort": receivePort.sendPort
  });
  SendPort sendPort = await receivePort.first;

  return AsyncCapturer._create(isolate, sendPort, dllPath);
}