CameraDeviceInfo class
Vision-camera-compatible camera device info, parsed from the native JSON.
Obtain via CameraController.getAvailableCameraDevices.
- Available extensions
Constructors
-
CameraDeviceInfo({required String id, required String name, required CameraPosition position, required CameraLensType lensType, required int sensorOrientation, required double minZoom, required double maxZoom, required double neutralZoom, required bool hasFlash, required bool hasTorch, required int maxPhotoWidth, required int maxPhotoHeight, double minExposure = -4.0, double maxExposure = 4.0, double minFocusDistanceCm = 0.0, bool isMultiCam = false, bool supportsLowLightBoost = false, bool supportsRawCapture = false, bool supportsFocus = true, HardwareLevel hardwareLevel = HardwareLevel.full, List<
PhysicalDeviceType> physicalDevices = const [], List<CameraExtension> extensions = const [], List<CameraDeviceFormat> formats = const [], double focalLength = 3.5, double aperture = 1.8}) -
const
-
CameraDeviceInfo.fromJson(Map<
String, dynamic> json) -
factory
Properties
- aperture → double
-
final
-
extensions
→ List<
CameraExtension> -
Vendor camera extensions available on this device (API 31+).
final
- focalLength → double
-
final
-
formats
→ List<
CameraDeviceFormat> -
Available capture formats, in the platform's enumeration order
(descending resolution on Android; roughly ascending on iOS). Use
bestFormat(constraints)(seeFormatNegotiation) rather than relying on list position.final - hardwareLevel → HardwareLevel
-
final
- hasFlash → bool
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasTorch → bool
-
final
- id → String
-
final
- isBackCamera → bool
-
Convenience: whether this device faces away from the user.
no setter
- isFrontCamera → bool
-
Convenience: whether this device faces the user.
no setter
- isMultiCam → bool
-
True if this is a virtual multi-camera backed by multiple physical lenses.
final
- lensType → CameraLensType
-
The lens kind (wide / ultra-wide / telephoto) of this device.
final
- maxExposure → double
-
Maximum exposure bias (EV).
final
- maxPhotoHeight → int
-
final
- maxPhotoWidth → int
-
final
- maxZoom → double
-
final
- minExposure → double
-
Minimum exposure bias (EV).
final
- minFocusDistanceCm → double
-
Minimum focus distance in centimetres. 0 = infinity (fixed-focus).
final
- minZoom → double
-
final
- name → String
-
final
- neutralZoom → double
-
Neutral zoom factor for multi-camera virtual devices.
final
-
physicalDevices
→ List<
PhysicalDeviceType> -
The underlying physical lenses (one entry for a plain camera; the
constituent lenses for a logical multi-cam device).
final
- position → CameraPosition
-
Which way the camera faces.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sensorOrientation → int
-
Degrees: 0 / 90 / 180 / 270
final
- supportsFocus → bool
-
final
- supportsLowLightBoost → bool
-
final
- supportsRawCapture → bool
-
final
Methods
-
bestFormat(
[List< CameraConstraint> constraints = const []]) → CameraDeviceFormat? -
Available on CameraDeviceInfo, provided by the FormatNegotiation extension
The best format for the given prioritisedconstraints(highest-resolution format when the list is empty). -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
listFromJson(
String jsonStr) → List< CameraDeviceInfo> - Parse a JSON array string returned by NitroCamera.getAvailableCameraDevicesJson.