CameraController class Null safety

Mixed in types
Implementers

Constructors

CameraController()

Properties

cameraEvent FlCameraEvent
read-only
cameraFlash FlashState?
read-only
cameraOptions FlCameraOptions?
read-only
cameraResolution CameraResolution
read / write
cameras List<CameraInfo>?
read-only
cameraZoom CameraZoomState?
read-only
channel MethodChannel
@protected, read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
hasListeners bool
Whether any listeners are currently registered. [...]
@protected, read-only, inherited
hasPreview bool
read-only
previousCamera CameraInfo?
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes. [...]
inherited
availableCameras() Future<List<CameraInfo>?>
获取可用摄像机 通常在第一次加载 Camera 后自动获取设备的可用相机,并且赋值给了cameras,所以后续可以不用再调用这个方法,可直接使用cameras [...]
dispose() Future<bool>
dispose all
override
eventListen(dynamic data) → void
消息回调监听
initialize({CameraEventListen? listen}) Future<bool>
初始化所有相机 camera 和 event initialize all Including camera and event
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
notifyListeners() → void
Call all the registered listeners. [...]
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes. [...]
inherited
resetCamera() Future<bool>
重新预览相机 Reset the camera
setFlashMode(FlashState status) Future<bool>
打开/关闭 闪光灯 Turn flash on / off
setZoomRatio(double ratio) Future<bool>
相机缩放 Camera zoom
startPreview(CameraInfo camera, {CameraResolution? resolution, Map<String, dynamic>? options}) Future<FlCameraOptions?>
开始预览 start Preview camerId 需要预览的相机 Camera ID to preview resolution 预览相机支持的分辨率 Preview the resolution supported by the camera
stopPreview() Future<bool>
暂停预览 stop Preview
switchCamera(CameraInfo camera) Future<bool>
切换摄像头 Switch Camera
toString() String
A string representation of this object. [...]
inherited

Operators

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