flutter_gen icon indicating copy to clipboard operation
flutter_gen copied to clipboard

[FR]: Support provider(..) for SVG images

Open bramp opened this issue 1 year ago • 1 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Describe the problem

AssetGenImage supports both image(..) and provider(..) the former returns a Widget and later a ImageProvider. SvgGenImage supports only svg(..) which returns a widget.

Describe the solution

It would be useful if SvgGenImage also supported a loader(..) method that returns a SvgLoader (which is the equivalent to a ImageProvider but for SVGs).

Additional context

The alternative at the moment is to write out, SvgAssetLoader(Assets.name.keyName)) instead of Assets.name.loader()

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

bramp avatar Sep 07 '23 17:09 bramp

any update?

xcc3641 avatar Jan 30 '24 05:01 xcc3641