DefaultTabController( // Added
length: 4, // Added
initialIndex: 0, //Added
child: Scaffold(
key: _scaffoldKey,
floatingActionButton:
this.pilotoTemVooAssumido=='1' ?
this.tabIndex==0 ?
FloatingActionButton(
backgroundColor: Colors.redAccent,
onPressed: () async {
},
child: Icon(Icons.delete_forever,color: Colors.white,),
) : null : null,
appBar: AppBar(
backgroundColor: Color.fromRGBO(37, 67, 154, 1),
//LARANJA Color.fromRGBO(249, 138, 18, 1) AZUL "Color.fromRGBO(37, 67, 154, 1)"
title: Text(
"Ata Brasil VA", style: TextStyle(color: Colors.white),),
iconTheme: new IconThemeData(color: Colors.white),
),
drawer: buildDrawer(),
body: buildBody(tabIndex),
bottomNavigationBar: BottomNavigationBar(
selectedItemColor: Color.fromRGBO(249, 138, 18, 1),
unselectedItemColor: Colors.white,
//backgroundColor: Color.fromRGBO(249, 138, 18, 1) ,
backgroundColor: Color.fromRGBO(37, 67, 154, 1),
currentIndex: tabIndex,
onTap: (int index) {
},
items: [
BottomNavigationBarItem(
icon: Icon(Icons.home),
title: Text('Home'),
),
BottomNavigationBarItem(
icon: Icon(Icons.airplanemode_active),
title: Text('Últimos Voos'),
),
BottomNavigationBarItem(
icon: Icon(Icons.map),
title: Text('Ao Vivo'),
),
]),
));