我想为底部导航栏项设置位置或边距,我的代码在这里:
Scaffold(
floatingActionButtonLocation:
FloatingActionButtonLocation.centerDocked,
floatingActionButton: FloatingActionButton(backgroundColor: Colors.amber,
child: const Icon(Icons.shopping_cart,), onPressed: () {},),
bottomNavigationBar: BottomAppBar(
shape: CircularNotchedRectangle(),
notchMargin: 10.0,
child: BottomNavigationBar(
type: BottomNavigationBarType.fixed,
items: [
new BottomNavigationBarItem(
icon: new Icon(Icons.home),
title: new Text("Home"),
),
new BottomNavigationBarItem(
icon: new Icon(Icons.star),
title: new Text("Resurants"),
),
new BottomNavigationBarItem(
icon: new Icon(Icons.location_on),
title: new Text("Account"),
),
new BottomNavigationBarItem(
icon: new Icon(Icons.person),
title: new Text("More"),
),
],
),
),
如何使底部元素具有边距?