flutter_svg
flutter_svg copied to clipboard
Colored background in transparent SVG when using `SvgPicture` & `BoxDecoration` `backgroundBlendMode`
When wrapping a SvgPicture.asset(...) with a Container/DecoratedBox with foregroundDecoration containing a color
and a backgroundBlendMode
, the image will sometimes have the chosen color wherever the SVG file is transparent.
Code example and images down below:
DecoratedBox(
foregroundDecoration: const BoxDecoration(
color: Colors.black,
backgroundBlendMode: BlendMode.saturation,
),
child: SvgPicture.asset('assets/images/certificate.svg'),
),
Expected result:
Actual result:
@appcapsergen Does this only happen on Android or also on iOS?
@kuemme01 on both platforms, but on one it happens when you scroll and on the other it happens when you stop scrolling. Not sure which was which, but it's similar when scrolling if it makes sense.