svgFileWithPath method

Finder svgFileWithPath(
  1. String path, {
  2. bool skipOffstage = true,
})

Finds widgets created by SvgPicture.file with the path argument.

Sample code

expect(find.svgFileWithPath('test/flutter_logo.svg'), findsOneWidget);

This will match SvgPicture.file with the path 'test/flutter_logo.svg'. If the skipOffstage argument is true (the default), then this skips nodes that are Offstage or that are from inactive Routes.

Implementation

Finder svgFileWithPath(String path, {bool skipOffstage = true}) {
  return _SvgFileWithPathFinder(path: path, skipOffstage: skipOffstage);
}