flutter_svg icon indicating copy to clipboard operation
flutter_svg copied to clipboard

Add colorMapper argument to named SvgPicture constructors

Open Joshix-1 opened this issue 1 year ago • 3 comments

in #856 you mentioned that people should use ColorMapper and that was exactly what I wanted anyway. But as the named constructors do not have a colorMapper argument, I didn't know it existed as an option. The argument could be passed through to the SvgLoader which then could use it. That would be more convinient than having to use the unnamed constructor with the correct BytesLoader.

Joshix-1 avatar Aug 12 '24 13:08 Joshix-1

The answer is in the same issue comment

Add00w avatar Sep 01 '24 18:09 Add00w

I know how to use ColorMapper. That's not the issue. I want to use the named SvgPicture constructors and use ColorMapper.

Joshix-1 avatar Sep 01 '24 18:09 Joshix-1

currently to use ColorMapper , we need to use the loader directly (SvgAssetLoader/SvgFileLoader/SvgStringLoader/SvgBytesLoader classes) , and we can not use it with SvgPicture which make it harder to use

Ali1Ammar avatar Oct 16 '24 18:10 Ali1Ammar