flutter_gen
flutter_gen copied to clipboard
[FR]: Support provider(..) for SVG images
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
any update?