doesNotExist method
void
doesNotExist()
Asserts that no widgets of type W
exist.
This method does not return a matcher but directly verifies that no widgets are found.
Example usage:
spot<ElevatedButton>().doesNotExist();
See also:
- 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. - existsAtLeastNTimes asserts that at least
n
widgets of typeW
exist. - existsAtMostOnce asserts that at most one widget exists.
- existsAtMostNTimes asserts that at most
n
widgets of typeW
exist.
Implementation
void doesNotExist() {
final none = copyWith(quantityConstraint: QuantityConstraint.zero);
snapshot(none);
}