Called when the user activates a selected item.
final void Function(int index, T item)? onItemSelected;