findsNothing top-level constant Null safety

Matcher const findsNothing

Asserts that the Finder matches no widgets in the widget tree.

Sample code

expect(find.text('Save'), findsNothing);

See also:

  • findsWidgets, when you want the finder to find one or more widgets.
  • findsOneWidget, when you want the finder to find exactly one widget.
  • findsNWidgets, when you want the finder to find a specific number of widgets.
  • findsAtLeastNWidgets, when you want the finder to find at least a specific number of widgets.

Implementation

const Matcher findsNothing = _FindsWidgetMatcher(null, 0);