WebVisionTask<R> class final

One official browser task on its own worker, with requests serialized.

Implemented types

Properties

hashCode → int
The hash code for this object.
no setterinherited
overlayActive → bool
False when canvas transfer is unsupported or worker drawing failed.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

attachOverlay(Object canvas) → Future<void>
Transfers a browser canvas to the task's worker for drawing.
override
detachOverlay() → Future<void>
Stops drawing; the transferred canvas stays blank afterwards.
override
detect(VisionImage image, int rotationDegrees, int? timestampMilliseconds, {VisionRegionOfInterest? regionOfInterest}) → Future<R>
Completes with copied results; requests and disposal keep their submission order. Only the tasks that accept a region of interest receive regionOfInterest. A browser frame arrives as image.browserFrame, which the backend releases after inference.
override
dispose() → Future<void>
Finishes queued requests and releases the SDK task on its own thread.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setOverlayOptions({required bool connections, required bool points, required bool mirrored, required double scale}) → void
Chooses what the worker draws and how the preview is transformed.
override
toString() → String
A string representation of this object.
inherited

Operators

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

Static Methods

create<R>(String task, TaskOptions options, RunningMode runningMode, Map<String, Object?> settings, R decode(Map<String, dynamic> json, Float64List? landmarks)) → Future<WebVisionTask<R>>
Creates one official browser task from options in runningMode; settings are the task's own options, named as in Google's JavaScript API, and decode reads each result.