I need a library to load an SVG (using the flutter_svg package) located in the main app's assets directory. Right now I have the following code in the library function:
SvgPicture.asset(svgSrc, package: 'example_app')
Where svgSrc will be 'assets/images/logo.svg'.
However on flutter run I get the following exception:
Error while trying to load an asset: Failed to load asset at "assets/packages/example_app/assets/images/logo.svg" (404)══╡ EXCEPTION CAUGHT BY SVG ╞═══════════════════════════════════════════════════════════════════════The following assertion was thrown resolving a single-frame picture stream:Unable to load asset: packages/example_app/assets/images/logo.svg
I have added the main app's pubspec.yaml I have:
assets: - assets/images/
Where am I going wrong here?