I have a BottomNavigationBar in flutter,and i want to on click of the individual widgets of the BottomNavigationBar, so on press button "Add Contact" it should navigate me to the next page which is my FifthScreen.
Widget _myListView(BuildContext context) {
return Column(children: [
Expanded(
child: ListView(
padding: const EdgeInsets.only(top: 10.0),
children: ListTile.divideTiles(
context: context,
tiles: [
ListTile(
leading: CircleAvatar(
backgroundImage: AssetImage('Icons.account_circle'),
),
title: Text('User 1'),
subtitle: Text('Hello'),
onTap: () => Navigator.push(context,
MaterialPageRoute(builder: (context) => FourthScreen())),
),
],
).toList(),
)),
BottomNavigationBar(items: [
BottomNavigationBarItem(icon: Icon(Icons.add), label: "Add Contact",),
BottomNavigationBarItem(icon: Icon(Icons.group), label: "Contacts"),
BottomNavigationBarItem(icon: Icon(Icons.settings), label: "Settings"),
])
]);
}```