I'm trying to paint a .png that has a transparent background:
I did:
RotatedBox(
quarterTurns: 2,
child: ColorFiltered(
child: Image.asset('metronome_off.png', height: 25),
colorFilter: ColorFilter.mode(
Colors.yellow, BlendMode.exclusion),
))
And tried all possible BlendMode.
types. In all of them the image gets painted, but also the background. How can I paint only the image?
Would it be better instead to make this trapezoid in Flutter using some paint tools? I guess it'd be too hard.
If I understand correctly, but if not correct tell me to understand it. try this code:
ColorFiltered(
colorFilter: ColorFilter.mode(Colors.yellow, BlendMode.srcATop),
child: RotatedBox(quarterTurns: 2, child: Image.asset("metronome_off.png",height: 25)),)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With