onTap property
final
The callback that is called when a item is tapped.
The widget creating the bottom navigation bar needs to keep track of the
current index and call setState
to rebuild it with the newly provided
index.
Implementation
final ValueChanged<int> onTap