为什么底部导航栏标题不显示?它应该显示在图标下方
class FlutterProject extends StatefulWidget {
final String title = "Flutter Bottom Tab demo";
@override
GoalsListState createState() {
return GoalsListState();
}
}
class GoalsListState extends State<FlutterProject>
with SingleTickerProviderStateMixin {
int _cIndex = 0;
void _incrementTab(index) {
setState(() {
_cIndex = index;
});
}
final List<Widget> _children = [
new One(),
new Two(),
new Three(),
new Four(),
new More()
];
@override
Widget build(BuildContext context) {
return new Scaffold(
body: _children[_cIndex],
bottomNavigationBar: BottomNavigationBar(
currentIndex: _cIndex,
type: BottomNavigationBarType.shifting,
items: [
BottomNavigationBarItem(
icon:
Icon(Icons.graphic_eq, color: Color.fromARGB(255, 0, 0, 0)),
title: new Text('One')),
BottomNavigationBarItem(
icon: Icon(Icons.report_problem,
color: Color.fromARGB(255, 0, 0, 0)),
title: new Text('Two')),
BottomNavigationBarItem(
icon: Icon(Icons.work, color: Color.fromARGB(255, 0, 0, 0)),
title: new Text('Three')),
BottomNavigationBarItem(
icon: Icon(Icons.domain, color: Color.fromARGB(255, 0, 0, 0)),
title: new Text('Four')),
BottomNavigationBarItem(
icon: Icon(Icons.menu, color: Color.fromARGB(255, 0, 0, 0)),
title: new Text('Five')),
],
onTap: (index) {
_incrementTab(index);
},
));
}
}
我在这里错过了什么?