skip to Main Content

After upgrading the flutter_svg package to the latest version as of this date (2.0.0+1).
The linting says that the color member is depreciated, but there’s this parameter called "colorFilter", but it has different enum properties that somehow render differently. Can someone explain how to just add normal color properties to an SVG or how the colorFilter properly works thanks.

Link to the package on pub dev

Here is an image of the new properties of the colorFilter.mode

2

Answers


  1. Please to you SVG package down grade to version and resolve this problem

    Login or Signup to reply.
  2. In my case, I used ColorFilter.mode with BlendMode.scrIn and it works fine, other modes didn’t seem to be working visually properly. So if you want to set color to svg, it should work if you used it with right BlendMode.

    P.S
    I had bottom navigation where I had to change colors of active svg icons.

    code example

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search