addBloc method

void addBloc (
  1. Bloc bloc

Registers bloc with this Dispatcher.

This method is also used for ValueBlocs and StateBlocs. bloc will be checked to see if it is either of these types.

If a Bloc with the same Bloc.key is already registered it will be replaced with bloc. This method will throw a StateError if this is closed. A Dispatcher is closed after its dispose method is called. To see if a Dispatcher is closed use getter closed.


void addBloc(Bloc bloc);