createCapturer method Null safety

Capturer createCapturer(
  1. Config config
)

Creates a Capturer object (it's used to detect or track faces in images or video sequences).

Implementation

Capturer createCapturer(Config config) {
  final capConstructor =
      _dll_handle.lookupFunction<_CapConstr_c, _CapConstr_dart>(_c_namespace + 'FacerecService_createCapturerE');
  final exception = _getException();
  final res = config._prepare();

  final cap_pointer = capConstructor(
      _impl, (_facerecConfDir + config._configFilepath).toNativeUtf8(), res.length, res.keys, res.values, exception);

  checkException(exception, _dll_handle);

  return Capturer(_dll_handle, cap_pointer);
}