1. @override
dynamic onRemoving()

Callback used to notify a node that it is about to be removed.

Source

@override
onRemoving() {
  while (onRemoveCallbacks.isNotEmpty) {
    onRemoveCallbacks.removeAt(0)();
  }
  super.onRemoving();
}