CanAccept typedef Null safety

CanAccept = bool Function(int oldIndex, int newIndex)

Implementation

typedef bool CanAccept(int oldIndex, int newIndex);