native library

The low-level FFI boundary of nitro_camera — the raw NitroCamera hybrid module, the FFI structs/records (CameraConfig, PhotoOptions, …), and the generated nativeValue/fromNative codec extensions.

Import this only for advanced use: calling the module directly, injecting a fake NitroCamera into OrientationManager/CameraDevicesObserver, or custom bridging. Stability tracks the generated nitro bridge, not this package's semver — symbols here can change whenever the spec or the generator changes. Everyday code should only need package:nitro_camera/nitro_camera.dart.

Classes

CameraConfig
A bundle of live camera settings applied atomically to an already-open session via NitroCamera.configure. This is the FFI struct behind the declarative CameraConfiguration Dart API: numeric/boolean only, so it crosses the boundary by value at zero serialization cost. Device / format / fps / audio changes still go through NitroCamera.openCamera (a reopen).
CameraConfigFfi
CameraConfigProxy
Zero-copy proxy for CameraConfig. Extends CameraConfig and overrides every getter to read lazily from native memory — no field is copied at construction time. Because CameraConfigProxy <: CameraConfig, a Stream<CameraConfigProxy> satisfies Stream<CameraConfig> via Dart covariant generics. Native memory is freed via a NativeFinalizer backed by the generated C symbol 'nitro_camera_release_CameraConfig'. Ownership: this proxy owns the generated struct shell. Zero-copy field buffers remain owned by the native implementation and must stay valid until this proxy is released by the finalizer or toDartAndRelease.
CameraDevice
Describes a physical camera device available on the hardware.
CameraEvent
A lifecycle / error event emitted by a camera session on NitroCamera.eventStream.
CameraFrame
A raw camera frame emitted by the frame-processing stream. pixels is a zero-copy view into the native camera buffer (BGRA / RGBA). Process the frame synchronously inside the stream listener; do NOT hold a reference past that point.
CameraFrameFfi
CameraFrameProxy
Zero-copy proxy for CameraFrame. Extends CameraFrame and overrides every getter to read lazily from native memory — no field is copied at construction time. Because CameraFrameProxy <: CameraFrame, a Stream<CameraFrameProxy> satisfies Stream<CameraFrame> via Dart covariant generics. Native memory is freed via a NativeFinalizer backed by the generated C symbol 'nitro_camera_release_CameraFrame'. Ownership: this proxy owns the generated struct shell. Zero-copy field buffers remain owned by the native implementation and must stay valid until this proxy is released by the finalizer or toDartAndRelease.
NitroCamera
The main NitroCamera hybrid module.
PhotoOptions
Per-capture options for NitroCamera.takePhotoWithOptions.
PhotoOptionsFfi
PhotoOptionsProxy
Zero-copy proxy for PhotoOptions. Extends PhotoOptions and overrides every getter to read lazily from native memory — no field is copied at construction time. Because PhotoOptionsProxy <: PhotoOptions, a Stream<PhotoOptionsProxy> satisfies Stream<PhotoOptions> via Dart covariant generics. Native memory is freed via a NativeFinalizer backed by the generated C symbol 'nitro_camera_release_PhotoOptions'. Ownership: this proxy owns the generated struct shell. Zero-copy field buffers remain owned by the native implementation and must stay valid until this proxy is released by the finalizer or toDartAndRelease.
PhotoResult
Result returned after a photo is captured.
PreviewTransform
How the Flutter Texture must be framed. In direct mode (Android, texture preview, nothing needing the GL renderer) the camera writes raw sensor- orientation buffers straight into the texture, so Dart rotates, mirrors and crops them; otherwise the native side already did (identity transform). Returned by NitroCamera.getPreviewTransform.
PreviewTransformFfi
PreviewTransformProxy
Zero-copy proxy for PreviewTransform. Extends PreviewTransform and overrides every getter to read lazily from native memory — no field is copied at construction time. Because PreviewTransformProxy <: PreviewTransform, a Stream<PreviewTransformProxy> satisfies Stream<PreviewTransform> via Dart covariant generics. Native memory is freed via a NativeFinalizer backed by the generated C symbol 'nitro_camera_release_PreviewTransform'. Ownership: this proxy owns the generated struct shell. Zero-copy field buffers remain owned by the native implementation and must stay valid until this proxy is released by the finalizer or toDartAndRelease.
RecordingOptions
Per-recording options for NitroCamera.startVideoRecording.
RecordingOptionsFfi
RecordingOptionsProxy
Zero-copy proxy for RecordingOptions. Extends RecordingOptions and overrides every getter to read lazily from native memory — no field is copied at construction time. Because RecordingOptionsProxy <: RecordingOptions, a Stream<RecordingOptionsProxy> satisfies Stream<RecordingOptions> via Dart covariant generics. Native memory is freed via a NativeFinalizer backed by the generated C symbol 'nitro_camera_release_RecordingOptions'. Ownership: this proxy owns the generated struct shell. Zero-copy field buffers remain owned by the native implementation and must stay valid until this proxy is released by the finalizer or toDartAndRelease.
RecordingResult
Result returned after a video recording is stopped.
ResolvedConfig
The configuration the native session actually applied — the read-back that mirrors vision-camera's onSessionConfigSelected. Returned by NitroCamera.configure.
ResolvedConfigFfi
ResolvedConfigProxy
Zero-copy proxy for ResolvedConfig. Extends ResolvedConfig and overrides every getter to read lazily from native memory — no field is copied at construction time. Because ResolvedConfigProxy <: ResolvedConfig, a Stream<ResolvedConfigProxy> satisfies Stream<ResolvedConfig> via Dart covariant generics. Native memory is freed via a NativeFinalizer backed by the generated C symbol 'nitro_camera_release_ResolvedConfig'. Ownership: this proxy owns the generated struct shell. Zero-copy field buffers remain owned by the native implementation and must stay valid until this proxy is released by the finalizer or toDartAndRelease.

Enums

AutoFocusMode
Auto-focus behaviour.
CameraEventType
Kind of CameraEvent delivered on NitroCamera.eventStream.
CameraLensType
The optical lens type of the camera.
CameraPosition
Which physical side of the device the camera faces.
FlashMode
Flash / torch mode.
InterruptionReason
Why the camera session was interrupted (mirrors AVFoundation reasons).
PermissionStatus
Camera permission status.
QualityPrioritization
Photo capture speed-vs-quality tradeoff.
VideoCodec
Video compression codec for recording.
VideoFileType
Container/file type for recorded video.
VideoStabilizationMode
Video stabilization mode applied to the capture pipeline.

Mixins

NitroCameraDefaults
Default throw UnimplementedError bodies for every member of NitroCamera, so hand-written fakes keep compiling when the spec grows: class FakeNitroCamera extends NitroCamera with NitroCameraDefaults { /* overrides */ }.

Extensions

AutoFocusModeFromNativeExt on int
AutoFocusModeNativeExt on AutoFocusMode
CameraConfigExt on CameraConfig
CameraConfigFfiExt on CameraConfigFfi
CameraDeviceRecordExt on CameraDevice
CameraEventRecordExt on CameraEvent
CameraEventTypeFromNativeExt on int
CameraEventTypeNativeExt on CameraEventType
CameraFrameExt on CameraFrame
CameraFrameFfiExt on CameraFrameFfi
CameraLensTypeFromNativeExt on int
CameraLensTypeNativeExt on CameraLensType
CameraPositionFromNativeExt on int
CameraPositionNativeExt on CameraPosition
FlashModeFromNativeExt on int
FlashModeNativeExt on FlashMode
InterruptionReasonFromNativeExt on int
InterruptionReasonNativeExt on InterruptionReason
NitroCameraNativeRef on NitroCamera
PermissionStatusFromNativeExt on int
PermissionStatusNativeExt on PermissionStatus
PhotoOptionsExt on PhotoOptions
PhotoOptionsFfiExt on PhotoOptionsFfi
PhotoResultRecordExt on PhotoResult
PreviewTransformExt on PreviewTransform
PreviewTransformFfiExt on PreviewTransformFfi
QualityPrioritizationFromNativeExt on int
QualityPrioritizationNativeExt on QualityPrioritization
RecordingOptionsExt on RecordingOptions
RecordingOptionsFfiExt on RecordingOptionsFfi
RecordingResultRecordExt on RecordingResult
ResolvedConfigExt on ResolvedConfig
ResolvedConfigFfiExt on ResolvedConfigFfi
VideoCodecFromNativeExt on int
VideoCodecNativeExt on VideoCodec
VideoFileTypeFromNativeExt on int
VideoFileTypeNativeExt on VideoFileType
VideoStabilizationModeFromNativeExt on int
VideoStabilizationModeNativeExt on VideoStabilizationMode