TargetMessages class

The wording of a refusal, flavored per host.

The logic of the ladder is shared; the sentences are not quite: a scenario speaks of s.tap and offers s.tester as the escape hatch, a live driver has no receiver prefix and no raw tester to offer. Everything else is deliberately identical, so a failure reads the same to a scenario author and to an agent driving a live app.

Constructors

TargetMessages({String prefix = '', String coveredEscapeHatch = '', String blankScreenHint = '', String narrowHint = 'To pick one, give the widget a Key and use that, or pass a Finder ' 'such as `finder.first` or `find.descendant(of: …, matching: …)`.'})
const

Properties

blankScreenHint → String
Replaces the lazy-list guess when the screen carries no text at all.
final
coveredEscapeHatch → String
Appended to the covered refusal — scenarios offer s.tester here.
final
hashCode → int
The hash code for this object.
no setterinherited
narrowHint → String
How to get from many matches to one, flavored per host.
final
prefix → String
Goes in front of verb names in messages — 's.' for scenarios, where the reader will retype the verb on a receiver called s.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

covered(String verb, String described, {String? landsOn}) → String
landsOn names what the pointer actually reaches, when the hit test could name it. It comes from the hit path the reachability check already ran — a fact, not a guess. Without it the sentence falls back to the two usual causes, both of which can be wrong at once: an OverflowBox that pushes a target's centre over a neighbour covers nothing and absorbs nothing.
decorationLabel(String verb, String described, {required String? label, required Offset center}) → String
The covered refusal for the one covering that is not a mistake: a text field's own decoration.
multiple(int count, String verb, String described, [List<String> where = const []]) → String
The refusal that has to be usable in one step.
nearMiss({required String rendered, required String common, required String? yours, required String theirs}) → String
A rendered string that is nearly the one asked for.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notFound(String verb, String described, String? screen, {bool blank = false, bool scrolls = true, String? hint, String prelude = ''}) → String
The nothing-matched refusal.
nothingScrolls(Object? within) → String
nthOverNothing(String inner) → String
An nth over a target that matches nothing at all.
offscreen(String described, Offset center) → String
outOfRange(String inner, int count, int index) → String
An nth index past the end of what its target matched.
propertyMiss(int count, {required String noun, required String form}) → String
A miss on rendered text that another property would have hit.
scrollExhausted(int maxScrolls, double step, String described) → String
toString() → String
A string representation of this object.
inherited

Operators

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