onTap property Null safety
final
Called when one of the items is tapped.
The stateful widget that creates the bottom navigation bar needs to keep
track of the index of the selected BottomNavigationBarItem and call
setState
to rebuild the bottom navigation bar with the new currentIndex.
Implementation
final ValueChanged<int>? onTap;