findsNothing top-level constant

const findsNothing = const _FindsWidgetMatcher(null, 0)

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.

Implementation

const Matcher findsNothing = _FindsWidgetMatcher(null, 0)