core/commands/native_tap/native_text_match library

Label matching shared by fdb native-tap --text on Android and the iOS simulator. Pure functions only.

Classes

NativeMatchAmbiguous<T>
Several matches and no index.
NativeMatchNone<T>
Nothing to tap: no matches, or the index is past the last one.
NativeMatchPick<T>
Outcome of pickNativeMatch.
NativeMatchPicked<T>

Constants

defaultNativeTapTextTimeoutSeconds → const int
--timeout for --text when none is given, same as fdb tap.
nativeTapTextPollInterval → const Duration
Pause between two reads of the screen while --text waits for a match.

Functions

foldNativeLabel(String s) → String
Lowercases and folds typographic variants, so Don't allow matches Don’t allow: curly quotes become straight ones, no-break spaces become spaces.
oneLineLabel(String s) → String
s with every run of whitespace (newlines included) collapsed to one space, for labels shown on a single output line.
pickNativeMatch<T>(List<T> matches, {required int? index}) → NativeMatchPick<T>
Picks the match to tap: the one at index (0-based, screen order, like fdb tap --index), or the only match when index is null.