image method

Finder image(
  1. ImageProvider<Object> image,
  2. {bool skipOffstage = true}

Finds Image and FadeInImage widgets containing image equal to the image argument.

Sample code

expect(find.image(FileImage(File(filePath))), findsOneWidget);

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


Finder image(ImageProvider image, { bool skipOffstage = true }) => _ImageWidgetFinder(image, skipOffstage: skipOffstage);