CameraController class

Inheritance

Constructors

CameraController(CameraDescription? description, ResolutionPreset? resolutionPreset, {bool? enableAudio = true, ResolutionPreset? streamingPreset, bool? androidUseOpenGL = false, TakePhotoCallback1? takePhotoCallback1, TakePhotoCallback2? takePhotoCallback2, bool? getPhotoByBinary, int captureWidth = 480, int captureHeight = 640})
With takePhotoCallback1, handle the callback function with images. With takePhotoCallback2, handle the callback function with binary(Uint8List). You must set getPhotoByBinary true to use takePhotoCallback2.

Properties

androidUseOpenGL bool?
final
captureHeight int
getter/setter pair
captureImage ↔ Image?
getter/setter pair
captureWidth int
getter/setter pair
data Uint8List?
getter/setter pair
description CameraDescription?
final
enableAudio bool?
final
getPhotoByBinary bool?
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
resolutionPreset ResolutionPreset?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
streamingPreset ResolutionPreset?
final
takePhotoCallback1 TakePhotoCallback1?
getter/setter pair
takePhotoCallback2 TakePhotoCallback2?
getter/setter pair
value CameraValue
The current value stored in this notifier.
getter/setter pairinherited

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
dispose() Future<void>
Releases the resources of this camera.
override
getStreamStatistics() Future<StreamStatistics>
Get statistics about the rtmp stream.
initialize() Future<void>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
pauseVideoStreaming() Future<void>
Pause video recording.
prepareForVideoRecording() Future<void>
prepareForVideoStreaming() Future<void>
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
resumeVideoStreaming() Future<void>
Resume video streaming after pausing.
startImageStream(onLatestImageAvailable onAvailable) Future<void>
startVideoStreaming(String url, {int bitrate = 1200 * 1024, required bool androidUseOpenGL, int? width, int? height}) Future<void>
Start a video streaming to the url in url`.
stopEverything() Future<void>
Stop streaming.
stopImageStream() Future<void>
Stop streaming images from platform camera.
stopVideoStreaming() Future<void>
Stop streaming.
takePhoto() Future<void>
toString() String
A string representation of this object.
inherited

Operators

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