onTabTapped method
void onTabTapped (int index)
Handles click on BottomNavigationBarItem.
params:
index
: it is track of current page index.
returns: None
Implementation
void onTabTapped(int index) {
currentPageIndex = index;
notifyListeners();
}