How to make an Icon to have two kinds of Colors in flutter

Viewed 206

I am building a flutter application. and I wanted to make an icon to have two colors. green and red. but I can only make either green or red. how can I achieve an icon as the following image.this image refresh icon The following code only changes to the whole red

Icon(
    Icons.cached,
    color: Colors.red,
   )
1 Answers

You can't.

Instead, I recommend you to use Flutter SVG package and make your icons SVG. with desired colors.

flutter_svg package link

Related