Explorer class

Strategic layer: search the captured tree for a target, scrolling and recapturing when the target isn't visible.

Constructors

Explorer({int maxAttempts = 106, double offsetTolerance = 8.0, Duration scanTimeout = const Duration(seconds: 6), double ambiguityRatio = 0.85, Duration paginationGrace = const Duration(milliseconds: 500)})
const

Properties

ambiguityRatio → double
Threshold above which top2.score / top1.score is considered an ambiguous match. 0.85 is conservative: only emit disambiguating when the runner-up is genuinely competitive.
final
hashCode → int
The hash code for this object.
no setterinherited
maxAttempts → int
final
offsetTolerance → double
Two positions count as "the same" when within this many logical pixels of each other. 8px tolerates animation overshoot / bounce without missing real cycles.
final
paginationGrace → Duration
How long a scan waits when the scroller first reports "cannot move further" in a direction before believing it: a paginating list reports a temporary end while its next page loads (Android Scanner PAGINATION_GRACE_MS). Renewed whenever a scroll lands fresh content.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scanTimeout → Duration
Optional wall-clock budget for a single findOrScroll call.
final

Methods

anchorScopeFor(FindTarget target, UiSnapshot snapshot) → Set<String>?
Public view of the ladder's inside_* anchor scope (the set of stable ids the target must live in), or null when no anchor is named / found.
find(UiSnapshot snapshot, FindTarget target) → FindResult
Search snapshot for target.
findOrScroll({required FindTarget target, required UiSnapshot? captureSnapshot(), required Scroller? scroller, ScanDirection direction = ScanDirection.forward, void onSnapshotObserved(UiSnapshot snapshot)?, CancelSignal signal = CancelSignal.none}) → Future<FindResult>
Search the live tree, scrolling and recapturing until the target is found or one of maxAttempts / scroll-end / cycle limits trips.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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

Static Methods

isControl(UiNode n) → bool
True for a leaf control promotion must never climb past.
isCoveredByOverlay(UiNode n, UiSnapshot snapshot) → bool
True when a modal surface above n covers it (the ladder's overlay fence — a finger cannot reach it).
kindAllows(String? kind, UiNode n) → bool
Public view of the ladder's intent-kind hard filter.
nearestEditable(UiSnapshot snapshot, UiNode node, {String? targetText}) → UiNode?
The editable field a set_text should target when the planner matched a NON-editable node (a hint or label), or null — see redirectEditable for the rules and the refusal reason.
notForbiddenBy(String? forbid, UiNode n) → bool
Public view of the ladder's forbid_text filter.
redirectEditable(UiSnapshot snapshot, UiNode label, {String? targetText}) → EditableRedirect
Where a set_text aimed at the NON-editable label may write — only an editable BOUND to it, never merely the nearest one (the historic "typed the name into the PIN box" bug). targetText is what the planner asked for (defaults to the label's own text).

Constants

controlRoles → const Set<String>
Roles that ARE the actionable element even without a tap action (Android INTERACTIVE_CONTROL_ROLES + text inputs).