CameraConfig class
Schema for SDK Camera Configuration
Constructors
-
CameraConfig({String? captureResolution, String? defaultCamera, bool? enableFlipFramesLeftRight, bool? enableFlipFramesTopBottom, bool? enableTapToFocus, List<
String> ? fallbackCameras, double? focalLength, double? maxFocalLength, double? maxZoomRatio, String? pictureResolution, int? tapToFocusTimeoutMs, bool? zoomGesture, double? zoomRatio}) -
CameraConfig.fromJson(Map<
String, dynamic> json) -
factory
- CameraConfig.fromRawJson(String str)
-
factory
Properties
- captureResolution ↔ String?
-
The preferred resolution for video capture (720p, 1080p, 4K). This resolution is used to
process images for scanning. 4K resolution is only supported for barcode scanning.
getter/setter pair
- defaultCamera ↔ String?
-
Preferred camera to open: FRONT (front-facing), BACK (rear-facing), EXTERNAL (external
rear), EXTERNAL_FRONT (external front), TELE (iOS-only; requests the telephoto lens and
is honored only on devices that have one; on Android or on iOS devices without a tele
lens BACK will be used), ULTRAWIDE (requests the ultra-wide lens and is honored only on
devices that have one; on devices without an ultra-wide lens BACK will be used).
getter/setter pair
- enableFlipFramesLeftRight ↔ bool?
-
(EXPERIMENTAL; Android-only) Mirrors the frame sideways (left-right) before it is
processed, equivalent to a horizontal flip along the vertical axis. The camera preview on
the screen is not affected. Disabled by default. NOTE: This has no effect when
pluginConfig.barcodeConfig.fastProcessMode is true.
getter/setter pair
- enableFlipFramesTopBottom ↔ bool?
-
(EXPERIMENTAL; Android-only) Turns the frame upside down (top-bottom) before it is
processed, equivalent to a vertical flip along the horizontal axis. The camera preview on
the screen is not affected. Disabled by default. NOTE: This has no effect when
pluginConfig.barcodeConfig.fastProcessMode is true.
getter/setter pair
- enableTapToFocus ↔ bool?
-
Allow user to tap on the preview to focus the camera on a specific area of the screen
(also known as tap-to-focus). Enabled by default.
getter/setter pair
-
fallbackCameras
↔ List<
String> ? -
Optional cameras to fall back if the defaultCamera is not found.
getter/setter pair
- focalLength ↔ double?
-
The focal length.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- maxFocalLength ↔ double?
-
The maximum focal length.
getter/setter pair
- maxZoomRatio ↔ double?
-
The maximum zoom ratio.
getter/setter pair
- pictureResolution ↔ String?
-
Deprecated - do not use! The preferred resolution for taking images (720, 720p, 1080,
1080p).
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tapToFocusTimeoutMs ↔ int?
-
(Note: this functionality is experimental - use at your own risk.) Duration in
milliseconds after which tap-to-focus automatically returns to continuous autofocus mode.
Range: 1000-60000ms.
getter/setter pair
- zoomGesture ↔ bool?
-
This flag enables or disables the zoom gesture if supported.
getter/setter pair
- zoomRatio ↔ double?
-
The zoom ratio to apply to the camera. When set to a value greater than 0, this property
takes precedence over defaultCamera for determining which physical lens to use. For
example, setting zoomRatio to 0.5 on a device with an ultra-wide lens will select that
lens, regardless of the defaultCamera setting. A value of 0 means no zoom ratio is
applied and the camera selection falls back to defaultCamera.
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toRawJson(
) → String -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited