ChildrenWithSomeOrderMatcher class
Compare the Actual finder children with the finders sequentially.
Sample code
This Widget:
ListView(
children: [
const YourWidget(),
AnotherWidget(),
Container(
child: Text('Hello'),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
children: [Widget1(),
Widget2()],
),
),
],
);
Match:
expect(
find.byType(ListView),
ChildrenWithSomeOrderMatcher([
find.byType(YourWidget),
find.text('Hello'),
find.byType(Widget2),
]));
No match:
expect(
find.byType(ListView),
ChildrenWithSomeOrderMatcher([
find.text('Hello'),
find.byType(YourWidget),
find.byType(Widget2),
]));
Constructors
-
ChildrenWithSomeOrderMatcher(List<
Finder> finders)
Properties
Methods
-
describe(
Description description) → Description -
Builds a textual description of the matcher.
override
-
describeMismatch(
covariant Finder item, Description mismatchDescription, Map matchState, bool verbose) → Description -
Builds a textual description of a specific mismatch.
override
-
matches(
covariant Finder item, Map matchState) → bool -
Does the matching of the actual vs expected values.
override
-
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