Solution 1 :
Okay seems like I was being silly.
You can add padding to a specific side to get it moving like so:
BottomNavigationBarItem(
icon: Container(
child: Icon(Icons.explore),
padding: EdgeInsets.fromLTRB(100, 0, 0, 0),
),
title: Text("Explore"),
),
Problem :
I have been trying to make the flutter bottom navigation bar widget to condense the gap between icons.
How would I be able to do this. I am imagining that I would need to create my own bottom navigation bar but if there is a simpler solution then I am all ears.
Thank you.
Comments
Comment posted by Abbas.M
One thing on top of my head, why not try adding some transparent fake Icons on the left and right?
Comment posted by Zana
that’s not a bad idea actually. But what do you mean by fake icons. I’m not sure if that would work as they would still be pressable no?
Comment posted by Abbas.M
Ah yes it looks like you can’t disable them as they’d still show an ink animation, I guess your best bet is to go for a custom navigation bar as there doesn’t seem to be a direct intuitive way to achieve what you want by using the BottomNavigation bar as is currently.
Comment posted by Zana
it does look like that yeah. plus I can’t assign any other widget to the items list
Comment posted by Abbas.M
Yes the Items list only allows you to use the NavigationBarItem which isn’t flexible at all