OcrNativeReader class

Reads a native surface over the app from a screenshot with text recognition, each line becoming a node at its place; for devices whose accessibility tree glint cannot reach.

Inheritance

Constructors

OcrNativeReader({required Future<String?> capture(), required Future<List<RecognisedLine>> recognize(String path), required double devicePixelRatio()})

Properties

capture → Future<String?> Function()
Captures the screen and returns the PNG path, or null when it fails.
final
devicePixelRatio → double Function()
final
hashCode → int
The hash code for this object.
no setterinherited
lastReadProblem ↔ String?
Why the last read came back empty, for the reply.
getter/setter pair
recognize → Future<List<RecognisedLine>> Function(String path)
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

foreignSurface() → Future<String?>
The window in front of the app when it belongs to someone else (a system picker, another app); null when the app is in front or this platform cannot tell.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
readFrom(String path) → Future<Scene>
Reads the surface from a screenshot already taken at path.
readSnapshot() → Future<Scene>
The native surface as a scene; a sentinel scene when it cannot be read.
override
toString() → String
A string representation of this object.
inherited

Operators

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