I am looking for someway to add ripple effect on the png or svg images in flutter, without covering the transparent parts in image.
I use this code to add ripple effect over an svg image:
Stack(
children: [
SvgPicture.asset(
R_Image.BACK,
width: 45,
height: 45,
fit: BoxFit.fill,
),
Positioned.fill(
child: Material(
color: Colors.transparent,
child: InkWell(
onTap: () {
Navigator.of(context).pop();
},
),
),
),
],
)
And the result is as follows:
How to remove transparent parts of svg image from ripple effect?
In android, I use @android:id/mask
for this purpose, but how to do that in flutter?