Closed ctujare closed 4 months ago
Try this:
PersistentBottomNavBarItem(
icon: Container(
alignment: Alignment.center,
child: SvgPicture.asset(
"icon.svg",
width: 20,
height: 20,
colorFilter: ColorFilter.mode(
Colors.red,
BlendMode.srcIn,
)
)
),
inactiveIcon: Container(
alignment: Alignment.center,
child: SvgPicture.asset(
"icon.svg",
width: 20,
height: 20,
colorFilter: ColorFilter.mode(
Colors.blueGrey,
BlendMode.srcIn,
)
)
),
// ...
);
Thank you for reporting this issue. From what I can seee you are using version 5 of the package with the prebuilt style 1? I found the error and it will be fixed with the next version of the beta. Thanks @lcardozoaplauze for posting a fix.
Resolved with version 5.0.0-beta.9
This is perfect ... Thank you sooo much
Try this:
PersistentBottomNavBarItem( icon: Container( alignment: Alignment.center, child: SvgPicture.asset( "icon.svg", width: 20, height: 20, colorFilter: ColorFilter.mode( Colors.red, BlendMode.srcIn, ) ) ), inactiveIcon: Container( alignment: Alignment.center, child: SvgPicture.asset( "icon.svg", width: 20, height: 20, colorFilter: ColorFilter.mode( Colors.blueGrey, BlendMode.srcIn, ) ) ), // ... );
This worked like a charm ... Thank you
Current Output when SVG image is used instead of an Icon
Is there a way I can use the SVG image instead of the icon
Currently the plus is an icon using Icon() and the other 3 are SvgPicture.asset()