loadTemplate method Null safety

Future<Template> loadTemplate(
  1. Uint8List binary_stream
)

Implementation

Future<Template> loadTemplate(Uint8List binary_stream) async {
  ReceivePort receivePort = ReceivePort();

  _sendPort.send({"event": _RecognizerEvents.LOAD_TEMPLATE, "sendPort": receivePort.sendPort, "binary_stream": binary_stream});

  int result = await receivePort.first;

  return Template(DynamicLibrary.open(_dllPath), Pointer<Void>.fromAddress(result));
}