Flutter bottom nav bar
4,042
Use a package to use svg, instruction is here: https://pub.dev/packages/flutter_svg#-installing-tab-
then include the svg file to your bottom navigation bar item in the icon parameter
bottomNavigationBar: BottomNavigationBar(
items: [
BottomNavigationBarItem(
icon: SvgPicture.asset(/*path to the svg file*/),
title: Text("Browse")
),
]
Author by
Prashant Mishra
Updated on December 16, 2022Comments
-
Prashant Mishra over 1 year
I was experimenting with bottom navigation bar in flutter. Again, very new to flutter. Can I use custom svg icons instead of the icons provided by flutter's material in BottomNavigationBarItem. It would be amazing if you could help me out with a code snippet.
I have this type of navbar I am working on right now.enter image description here. I have these custom icons but I don't know how to use them.