onTap property

(void Function() Function(int)?) onTap
final

Defines onTap function given index of the pressed step.

Returns the function to execute when the step with given index is pressed.

For example, if you want to print the index of the pressed step:

onTap: (index) => () => print('$index pressed')

or

onTap: (index) {
  return () {
    print('$index pressed');
  };
},

Implementation

final void Function() Function(int)? onTap;