TextSightController class final

Configures and drives a live camera recognition session.

The Dart face of the live-camera driver. A ChangeNotifier exposing the current configuration and session state through individual getters — no bundled state object — that a TextSightView (or any listener) rebuilds from. Per-frame results arrive on captures; the preview renders the textureId. Every call delegates to TextSightPlatform.instance, so the controller carries no platform knowledge of its own.

Inheritance

Constructors

TextSightController({TextSightOptions options = const TextSightOptions(), bool torchEnabled = false})
Creates a controller seeded from options (the shared recognizer config) and an initial torch state. Nothing opens the camera until start.

Properties

captures Stream<TextSightCapture>
The live per-frame results stream. Subscribers must cancel their own subscription. The controller does not own it.
no setter
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
isRunning bool
Whether a session is started and delivering captures.
no setter
isTorchEnabled bool
Whether the torch is currently requested on.
no setter
languages Iterable<Locale>
The current preferred recognition languages, most-preferred first.
no setter
recognitionLevel RecognitionLevel
The current accuracy/latency level.
no setter
regionOfInterest Rect?
The current scan-box, or null when recognition spans the whole frame.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
textureId int?
The preview texture id, or null before start has acquired one. Read by TextSightView to mount the camera preview.
no setter

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
dispose() → void
Discards any resources used by the object.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
start() Future<void>
Opens the camera if needed and begins recognition. Idempotent on the texture: a session acquired once is reused across stop/start.
stop() Future<void>
Pauses recognition while keeping the session (and texture) alive.
toString() String
A string representation of this object.
inherited
updateLanguages(Iterable<Locale> languages) Future<void>
Replaces the preferred recognition languages, most-preferred first.
updateRecognitionLevel(RecognitionLevel level) Future<void>
Switches the accuracy/latency level of the running recognizer.
updateRegionOfInterest(Rect? roi) Future<void>
Restricts recognition to roi, or clears it (whole frame) when null.
updateTorchEnabled({required bool enabled}) Future<void>
Requests the camera torch on or off (no-op on devices without one).

Operators

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