CameraConfigProxy constructor

CameraConfigProxy(
  1. Pointer<CameraConfigFfi> _native
)

Takes ownership of native. Super fields are zeroed and never read; all getters below are overridden to read from native memory instead. Do NOT call malloc.free on the struct shell after passing it here, and do not free zero-copy field buffers while the proxy may be read.

Implementation

CameraConfigProxy(this._native)
  : super(
      zoom: 0.0,
      exposure: 0.0,
      flash: 0,
      torch: 0,
      torchLevel: 0.0,
      whiteBalanceKelvin: 0,
      videoHdr: 0,
      lowLightBoost: 0,
      autoFocus: 0,
      videoStabilization: 0,
      active: 0,
      enableFrameProcessing: 0,
      pixelFormat: 0,
      samplingRate: 0,
    ) {
  assert(
    _finalizer != null,
    'CameraConfigProxy._init() was not called. Ensure the Nitro impl class constructor ran before creating proxies.',
  );
  _finalizer!.attach(this, _native.cast(), detach: this, externalSize: 512);
}