CameraModule class
Module for controlling device cameras and receiving frame streams.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isRunning → bool
-
Returns whether the camera is currently active.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
stream
→ Stream<
CameraFrame> -
A stream of CameraFrame objects captured in real-time.
no setter
Methods
-
applyFilterShader(
String shaderType) → Future< bool> - Applies a real-time GPU fragment shader filter to the camera preview. Supported types: 'none', 'chromaKey', 'monochrome', 'sepia'
-
flip(
) → Future< bool> - Flips between front and back cameras.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerCustomClassifier(
{required String modelAssetPath, required List< String> labels, double threshold = 0.5}) → Future<bool> - Registers a custom TensorFlow Lite or CoreML model for real-time edge classification.
-
setFlash(
bool on) → Future< bool> - Toggles the device flash/torch.
-
setZoom(
double level) → Future< bool> - Sets the digital zoom level (e.g., 1.0 to 10.0).
-
start(
{CameraQuality quality = CameraQuality.hd, int? width, int? height, bool autoRequestPermission = true}) → Future< int?> -
Starts the camera and returns the native
textureIdfor rendering. -
startVideoRecording(
{String? fileName}) → Future< String?> - Starts native video recording and returns the output file path.
-
startWithOptions(
CameraOptions options, {bool autoRequestPermission = true}) → Future< int?> - Starts the camera with granular, fully-customized native options.
-
stop(
) → Future< bool> - Stops the camera and releases all native resources.
-
stopVideoRecording(
) → Future< String?> - Stops native video recording and returns the saved file path.
-
takePhoto(
{String? fileName}) → Future< String?> - Captures a still photo and returns the saved file path when supported.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited