text_sight library

Live, on-device text recognition — Apple Vision on iOS, ML Kit on Android.

Import only this file. The live entry points are TextSightView with a TextSightController; the static one-shot is TextSight. Either way recognition yields TextSightCaptures of RecognizedLines. TextSightModel reports and controls when the on-device model is ready.

Classes

ModelDownloading
The unbundled ML Kit model is being fetched from Google Play Services.
ModelReady
The recognition model is present; recognition will produce results.
ModelUnavailable
The model cannot be made ready, so recognition will not produce results.
RecognizedElement
A sub-line recognition unit (typically a word) with its own text and box.
RecognizedLine
A single recognized line of text with its location and confidence.
TextSight
One-shot, still-image text recognition — the static counterpart to the live TextSightController.
TextSightCapture
The result of one recognition pass — every RecognizedLine found plus the size of the image they were located in.
TextSightController
Configures and drives a live camera recognition session.
TextSightModel
Controls and observes readiness of the on-device recognition model.
TextSightOptions
The source-agnostic recognizer configuration shared by both drivers.
TextSightReadinessState
The readiness of the on-device recognition model, reported by TextSightModel.
TextSightView
A live camera preview that recognizes text, driven by a TextSightController.

Enums

ModelUnavailableReason
Why the recognition model could not be made ready (see ModelUnavailable).
RecognitionLevel
How aggressively text is recognized, trading latency for accuracy.

Typedefs

TextSightOverlayBuilder = Widget Function(BuildContext context, TextSightCapture capture, BoxConstraints constraints)
Builds an overlay painted over the live preview from the latest capture.