add method

void add(
  1. GlobalEvent event
)

Add a GlobalEvent that will be passed on to all the ChainedBlocs.

Implementation

void add(GlobalEvent event) {
  for (var bloc in _blocs) {
    try {
      bloc._add(event);
    } catch (e, _) {
      // Silence the error thrown by `Bloc` when a handler has not been registered.
    }
  }
}