OnToggle typedef Null safety

OnToggle = void Function(int index)

Implementation

typedef OnToggle = void Function(int index);