Finds widgets by searching for one with a particular Key.
Example:
expect(tester, hasWidget(find.byKey(backKey)));
If the skipOffstage
argument is true (the default), then this skips
nodes that are Offstage or that are from inactive Routes.
Source
Finder byKey(Key key, { bool skipOffstage: true }) => new _KeyFinder(key, skipOffstage: skipOffstage);