Finder byConfig(Widget config, { bool skipOffstage: true })

Finds widgets whose current widget is the instance given by the argument.

Example:

// Suppose you have a button created like this:
Widget myButton = new Button(
  child: new Text('Update')
);

// You can find and tap on it like this:
tester.tap(find.byConfig(myButton));

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

Source

Finder byConfig(Widget config, { bool skipOffstage: true }) => new _ConfigFinder(config, skipOffstage: skipOffstage);