IndexCallback typedef Null safety

IndexCallback = void Function(int index)

Callback with index.