Skip to content

Instantly share code, notes, and snippets.

@IshanFx
Created October 9, 2018 17:20
Show Gist options
  • Save IshanFx/f04874214e5db4e1af6aeb425b0aa324 to your computer and use it in GitHub Desktop.
Save IshanFx/f04874214e5db4e1af6aeb425b0aa324 to your computer and use it in GitHub Desktop.
class _MyHomePageState extends State<MyHomePage> {
int _cIndex = 0;
void _incrementTab(index) {
setState(() {
_cIndex = index;
});
}
@override
Widget build(BuildContext context) {
return new Scaffold(
appBar: new AppBar(
title: new Text(widget.title),
),
body: new Center(
child: new Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
],
),
),
bottomNavigationBar:BottomNavigationBar(
currentIndex: _cIndex,
type: BottomNavigationBarType.shifting ,
items: [
BottomNavigationBarItem(
icon: Icon(Icons.ac_unit,color: Color.fromARGB(255, 0, 0, 0)),
title: new Text('')
),
BottomNavigationBarItem(
icon: Icon(Icons.ac_unit,color: Color.fromARGB(255, 0, 0, 0)),
title: new Text('')
),
BottomNavigationBarItem(
icon: Icon(Icons.ac_unit,color: Color.fromARGB(255, 0, 0, 0)),
title: new Text('')
),
BottomNavigationBarItem(
icon: Icon(Icons.access_alarm,color: Color.fromARGB(255, 0, 0, 0)),
title: new Text('')
)
],
onTap: (index){
_incrementTab(index);
},
)
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment