Searches a widget tree and returns nodes that match a particular pattern.
- Implemented by
Constructors
- Finder({bool skipOffstage: true })
-
Initialises a Finder. Used by subclasses to initialize the skipOffstage property.
Properties
- description → String
-
Describes what the finder is looking for. The description should be a brief English noun phrase describing the finder's pattern.
read-only - first → Finder
-
Returns a variant of this finder that only matches the first element matched by this finder.
read-only - last → Finder
-
Returns a variant of this finder that only matches the last element matched by this finder.
read-only - skipOffstage → bool
-
Whether this finder skips nodes that are offstage.
read-only - hashCode → int
-
Get a hash code for this object.
read-only, inherited - runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Operators
-
operator ==(
other) → bool -
The equality operator.
inherited
Methods
-
apply(
Iterable<Element> candidates) → Iterable<Element> -
Returns all the elements in the given list that match this finder's pattern.
-
evaluate(
) → Iterable<Element> -
Returns the current result. If precache was called and returned true, this will cheaply return the result that was computed then. Otherwise, it creates a new iterable to compute the answer.
-
precache(
) → bool -
Attempts to evaluate the finder. Returns whether any elements in the tree matched the finder. If any did, then the result is cached and can be obtained from evaluate.
-
toString(
) → String -
Returns a string representation of this object.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited