unregister method
Unregister a callback
Implementation
@override
void unregister(
CallbackWithReturn<CallbackInputType, CallbackReturnType> callback) {
// Find and remove the first occurrence of this callback
for (int i = 0; i < _keys.length; i++) {
final id = _keys[i];
if (map.get(id) == callback) {
map.delete(id);
_keys.removeAt(i);
return;
}
}
}