onTap property

(void Function(int)?) onTap
final

The function that will be called whenever the user taps on an item. The parameter is the item index in items.

Usually used to call setState and change the currentIndex's value.

Implementation

final void Function(int)? onTap;