svg method

Finder svg(
  1. BytesLoader svg, {
  2. bool skipOffstage = true,
})

Finds SvgPicture widgets containing svg equal to the svg argument.

Sample code

expect(find.svg(SvgPicture.asset('assets/asset_name.svg')), findsOneWidget);

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

Implementation

Finder svg(BytesLoader svg, {bool skipOffstage = true}) {
  return _SvgFinder(svg, skipOffstage: skipOffstage);
}