How can I pass the ontap function to each icons
items: const <BottomNavigationBarItem>[
BottomNavigationBarItem(
icon: Icon(Icons.call),
label: 'Calls',
),
BottomNavigationBa
],
onTap: (i) {
},
How.do i pass it to each items
2
Answers
You can use callback method update widget based on tap,
You can follow this example code.
If you are using on same widget, Follow doc example