我在 Flutter 中有一个底部导航栏,并计划为这些项目使用 Font Awesome Icons。但是,与材质图标相比,字体真棒图标周围没有任何间距。这使他们触摸底部导航栏项目标题。有什么办法可以在这些之间添加空格吗?
底部导航条码:
BottomNavigationBar(
type: BottomNavigationBarType.shifting,
currentIndex: _currentIndex,
items: [
BottomNavigationBarItem(
icon: Icon(
Icons.list,
size: 30.0,
),
title: Text('Notice Board'),
backgroundColor: Colors.grey[900],
),
BottomNavigationBarItem(
icon: Icon(
FontAwesomeIcons.handsHelping,
// size: 30.0,
),
title: Text('Services'),
backgroundColor: Colors.green,
),
BottomNavigationBarItem(
icon: Icon(
Icons.add,
size: 35.0,
),
title: Text('Create'),
backgroundColor: Colors.cyan,
),
BottomNavigationBarItem(
icon: Icon(
FontAwesomeIcons.store,
// size: 30.0,
),
title: Text('Marketplace'),
backgroundColor: Colors.orange,
),
],
onTap: (index) {
setState(() {
_currentIndex = index;
});
},
),
Run Code Online (Sandbox Code Playgroud)