CameraValue class

The state of a CameraController.

Constructors

CameraValue({required bool isInitialized, String? errorDescription, Size? previewSize, required bool isRecordingVideo, required bool isTakingPicture, required bool isStreamingImages, required bool isRecordingPaused, required FlashMode flashMode, required ExposureMode exposureMode, required FocusMode focusMode, required bool exposurePointSupported, required bool focusPointSupported, required DeviceOrientation deviceOrientation, required CameraDescription description, DeviceOrientation? lockedCaptureOrientation, DeviceOrientation? recordingOrientation, bool isPreviewPaused = false, DeviceOrientation? previewPauseOrientation})
Creates a new camera controller state.
const
CameraValue.uninitialized(CameraDescription description)
Creates a new camera controller state for an uninitialized controller.
const

Properties

aspectRatio double
Convenience getter for previewSize.width / previewSize.height.
no setter
description CameraDescription
The properties of the camera device controlled by this controller.
final
deviceOrientation DeviceOrientation
The current device UI orientation.
final
errorDescription String?
Description of an error state.
final
exposureMode ExposureMode
The exposure mode the camera is currently set to.
final
exposurePointSupported bool
Whether setting the exposure point is supported.
final
flashMode → FlashMode
The flash mode the camera is currently set to.
final
focusMode FocusMode
The focus mode the camera is currently set to.
final
focusPointSupported bool
Whether setting the focus point is supported.
final
hasError bool
Whether the controller is in an error state.
no setter
hashCode int
The hash code for this object.
no setterinherited
isCaptureOrientationLocked bool
Whether the capture orientation is currently locked.
no setter
isInitialized bool
True after CameraController.initialize has completed successfully.
final
isPreviewPaused bool
True when the preview widget has been paused manually.
final
isRecordingPaused bool
True when camera isRecordingVideo and recording is paused.
no setter
isRecordingVideo bool
True when the camera is recording (not the same as previewing).
final
isStreamingImages bool
True when images from the camera are being streamed.
final
isTakingPicture bool
True when a picture capture request has been sent but as not yet returned.
final
lockedCaptureOrientation DeviceOrientation?
The currently locked capture orientation.
final
previewPauseOrientation DeviceOrientation?
Set to the orientation the preview was paused in, if it is currently paused.
final
previewSize Size?
The size of the preview in pixels.
final
recordingOrientation DeviceOrientation?
The orientation of the currently running video recording.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({bool? isInitialized, bool? isRecordingVideo, bool? isTakingPicture, bool? isStreamingImages, String? errorDescription, Size? previewSize, bool? isRecordingPaused, FlashMode? flashMode, ExposureMode? exposureMode, FocusMode? focusMode, bool? exposurePointSupported, bool? focusPointSupported, DeviceOrientation? deviceOrientation, Optional<DeviceOrientation>? lockedCaptureOrientation, Optional<DeviceOrientation>? recordingOrientation, bool? isPreviewPaused, CameraDescription? description, Optional<DeviceOrientation>? previewPauseOrientation}) CameraValue
Creates a modified copy of the object.
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