create method Null safety

Future<AsyncRecognizer> create(
  1. Pointer<Void> implementation,
  2. String facerecConfDir,
  3. String dllPath,
  4. String ini_file,
  5. bool processing,
  6. bool matching,
  7. bool processing_less_memory_consumption
)

Implementation

static Future<AsyncRecognizer> create(Pointer<Void> implementation, String facerecConfDir, String dllPath, String ini_file, bool processing, bool matching,
    bool processing_less_memory_consumption) async {
  ReceivePort receivePort = ReceivePort();

  Isolate isolate = await Isolate.spawn(_isolateImplementation, {
    "implementation": implementation.address,
    "facerecConfDir": facerecConfDir,
    "dllPath": dllPath,
    "ini_file": ini_file,
    "processing": processing,
    "matching": matching,
    "processing_less_memory_consumption": processing_less_memory_consumption,
    "sendPort": receivePort.sendPort
  });
  SendPort sendPort = await receivePort.first;

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