byTooltip method Null safety

Finder byTooltip(
  1. String message,
  2. {bool skipOffstage = true}
)

Finds Tooltip widgets with the given message.

Sample code

expect(find.byTooltip('Back'), findsOneWidget);

If the skipOffstage argument is true (the default), then this skips nodes that are Offstage or that are from inactive Routes.

Implementation

Finder byTooltip(String message, { bool skipOffstage = true }) {
  return byWidgetPredicate(
    (Widget widget) => widget is Tooltip && widget.message == message,
    skipOffstage: skipOffstage,
  );
}