existsAtLeastNTimes method
Asserts that at least n
widgets of type W
exist.
Example usage:
spot<ElevatedButton>().existsAtLeastNTimes(2);
See also:
- doesNotExist asserts that no widgets of type
W
exist. - existsOnce asserts that exactly one widget of type
W
exists. - existsExactlyNTimes asserts that exactly
n
widgets of typeW
exist. - existsAtLeastOnce asserts that at least one widget of type
W
exists. - existsAtMostOnce asserts that at most one widget exists.
- existsAtMostNTimes asserts that at most
n
widgets of typeW
exist.
Implementation
MultiWidgetMatcher<W> existsAtLeastNTimes(int n) {
final atLeast = copyWith(quantityConstraint: QuantityConstraint.atLeast(n));
return snapshot(atLeast).multi;
}