call method

void call(
  1. T argument
)

Callback method. Invokes the corresponding method on each callback in this collection.

The list of callbacks being invoked is computed at the start of the method and is unaffected by any changes subsequently made to this collection.

Implementation

void call(T argument) {
  final int length = _callbacks.length;
  if (length == 1) {
    _callbacks[0].call(argument);
  } else if (0 < length) {
    for (final ArgumentCallback<T> callback
        in List<ArgumentCallback<T>>.from(_callbacks)) {
      callback(argument);
    }
  }
}