Finder byTooltip(String message, { bool skipOffstage: true })

Finds Tooltip widgets with the given message.

Example:

expect(tester, hasWidget(find.byTooltip('Back')));

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

Source

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