CaptureService class abstract

Camera access.

Implementations wrap a camera plugin; UI code only uses this interface. All methods throw StoryException on failure.

Constructors

CaptureService()

Properties

capabilities → CaptureCapabilities?
Capabilities after initialize, or null.
no setter
events → Stream<CaptureEvent>
Session events (interruptions, failures).
no setter
hashCode → int
The hash code for this object.
no setterinherited
isInitialized → bool
Whether a preview is available.
no setter
isRecording → bool
Whether a recording is in progress.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

buildPreview() → Widget
The live preview, filling its parent with cover semantics.
dispose() → Future<void>
Releases everything. The service is unusable afterwards.
focusAt(Offset point) → Future<void>
Focuses and meters at point (0–1 in preview coordinates).
initialize(StoryCameraLens lens, {required CaptureResolution resolution, required bool enableAudio}) → Future<CaptureCapabilities>
Starts the camera with lens.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
release() → Future<void>
Releases the camera (app going to background). Call initialize to resume.
setFlashMode(StoryFlashMode mode) → Future<void>
Sets the flash mode.
setZoom(double zoom) → Future<void>
Sets the zoom factor, clamped to the capabilities.
startRecording() → Future<void>
Starts recording a video.
stopRecording() → Future<CapturedFile>
Stops recording and returns the video.
switchLens() → Future<CaptureCapabilities>
Switches to the other lens; allowed while recording when the platform supports it.
takePhoto() → Future<CapturedFile>
Takes a photo.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited