Finder class

Query helper for locating text in the rendered output.

Accessed via tester.find.

Properties

gestureZones List<String>
Returns all registered gesture zone IDs.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

byKey(Key key) List<Element>
Returns mounted elements whose widget key equals key.
byKeyLocation(Key key) TapTarget
Returns a TapTarget centered on the first match for key.
byType<T extends Widget>() List<Element>
Returns mounted elements whose widget type is T.
byTypeLocation<T extends Widget>() TapTarget
Returns a TapTarget centered on the first match for widget type T.
element(Element element) TapTarget
Returns a TapTarget centered on element's render bounds.
firstByKey(Key key) Element?
Returns the first mounted element whose widget key equals key, or null.
firstByType<T extends Widget>() Element?
Returns the first mounted element whose widget type is T, or null.
gesture(int index) TapTarget
Returns the Nth gesture zone (0-indexed).
hasZone(String zoneId) bool
Returns true if a zone with zoneId exists and is non-zero.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
text(String text) bool
Returns true if the latest rendered view contains text.
textLocation(String text) TapTarget
Returns a TapTarget that locates text in the rendered output and taps at its coordinates.
textMatching(Pattern pattern) bool
Returns true if the latest rendered view contains a line matching the regular expression pattern.
toString() String
A string representation of this object.
inherited
zone(String zoneId) TapTarget
Returns a TapTarget for a zone with zoneId.

Operators

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