修改底部tab和头部颜色

master
章文轩 3 years ago
parent 72ce5742be
commit deecd844f3

@ -21,6 +21,7 @@ class _PowerLoggerViewState extends State<PowerLoggerView> {
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
title: Text('Logger View'), title: Text('Logger View'),
backgroundColor: Colors.blue,
actions: [ actions: [
IconButton( IconButton(
icon: Icon(Icons.clear_all_rounded), icon: Icon(Icons.clear_all_rounded),
@ -47,6 +48,7 @@ class _PowerLoggerViewState extends State<PowerLoggerView> {
builder: (context, kSetState) { builder: (context, kSetState) {
_setState = kSetState; _setState = kSetState;
return BottomNavigationBar( return BottomNavigationBar(
backgroundColor: Colors.white,
currentIndex: _currentIndex, currentIndex: _currentIndex,
onTap: (index) { onTap: (index) {
_currentIndex = index; _currentIndex = index;
@ -59,14 +61,14 @@ class _PowerLoggerViewState extends State<PowerLoggerView> {
}, },
items: [ items: [
BottomNavigationBarItem( BottomNavigationBarItem(
icon: Icon(Icons.assessment), label: 'Log'), icon: Icon(Icons.assessment,color: Color(0xFF666666),),activeIcon: Icon(Icons.assessment,color: Colors.blue,), label: '日志'),
BottomNavigationBarItem( BottomNavigationBarItem(
icon: Icon(Icons.perm_device_information), icon: Icon(Icons.perm_device_information,color: Color(0xFF666666),),activeIcon: Icon(Icons.perm_device_information,color: Colors.blue,),
label: 'Info', label: '信息',
), ),
BottomNavigationBarItem( BottomNavigationBarItem(
icon: Icon(Icons.settings), icon: Icon(Icons.settings,color: Color(0xFF666666),),activeIcon: Icon(Icons.settings,color: Colors.blue,),
label: 'Settings', label: '设置',
), ),
], ],
); );

Loading…
Cancel
Save