I am trying to use a SvgPicture inside BottomNavigationBar and it should change colors depending on if it's selected or unselected. This works with Icons out of the box - would it also be possible with SVG?
It would be helpful to see a reproduction of what you're trying to do.
My understanding is that BottomNavigationBarItem has both an icon and activeIcon widget, and that's how that works - I don't see why SVG should need anything special for that.
Alternatively you can use color passed by BottomNavigationBar from context:
BottomNavigationBarItem(
icon: Builder(
builder: (context) {
return SvgPicture.asset(
'my_icon.svg',
color: IconTheme.of(context).color,
);
},
),
),
Going to close this as not a bug in flutter_svg.
Most helpful comment
Alternatively you can use color passed by BottomNavigationBar from context: