Camera class

The Camera class used to set image capture settings, start/stop preview, snap pictures, and retrieve frames for encoding for video.

This class is a client for the Camera service, which manages the actual camera hardware.

This exposes the deprecated Android Camera API. This should only be used with Android sdk versions less than 21.

Mixed in types


handle int
Identifier for an object on the native side of the plugin.
hashCode int
The hash code for this object.
previewTexture NativeTexture
Sets the NativeTexture to be used for live preview.
runtimeType Type
A representation of the runtime type of the object.


noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
release() Future<void>
Disconnects and releases the Camera object resources.
startPreview() Future<void>
Starts capturing and drawing preview frames to the screen.
stopPreview() Future<void>
Stops capturing and drawing preview frames to the previewTexture, and resets the camera for a future call to startPreview.
toString() String
A string representation of this object.


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

Static Methods

getCameraInfo(int cameraId) Future<CameraInfo>
Retrieves information about a particular camera.
getNumberOfCameras() Future<int>
Retrieves the number of physical cameras available on this device.
open(int cameraId) Camera
Creates a new Camera object to access a particular hardware camera.