image method Null safety

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.

Implementation

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