CameraSession class
Owns the controller and its replacements; borrowers listen without disposing.
- Inheritance
-
- Object
- ChangeNotifier
- CameraSession
- Implemented types
- Available extensions
Constructors
Properties
-
cameras
→ List<
XCameraDescription> -
Discovery results, empty until initialization or when no device is available.
no setter
- disposed → bool
-
Whether new work is refused, including while native release is pending.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → XCameraController?
-
The current value of the object.
no setteroverride
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
dispose(
) → Future< void> -
Closes immediately to new work; completes after native work and release.
override
-
ensureAudio(
) → Future< XCameraController?> - Reopens the current lens with audio, retaining silent capture on failure.
-
flipCamera(
) → Future< void> - Changes lens on the current controller unless it is recording.
-
initialize(
) → Future< XCameraController?> - Reuses an open controller, or opens the front camera when available.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
stopRecording(
) → Future< void> - Ends an active recording without closing the preview.
-
subscribe(
VoidCallback callback) → VoidCallback -
Available on Listenable, provided by the ListenableExtension extension
Addscallbackas listener and returns a function to remove it. -
toString(
) → String -
A string representation of this object.
inherited
-
useController<
T> (Future< T> operation(XCameraController)) → Future<T?> - Serializes use with lens changes, replacement and native disposal.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited