addEffects method

Store addEffects (BaseEffect effectInstance)

This method is usefull to add effects passing effectInstance on demand.

Implementation

Store addEffects(BaseEffect effectInstance) {
  /*var effect =
      StreamGroup.merge(effectInstance.registerEffects(_actions, this))
          .asBroadcastStream();*/
  var effect = MergeStream(effectInstance.registerEffects(_actions, this))
      .asBroadcastStream();
  if (effectInstance.effectKey == null) {
    _effSub.addEffects(effect);
  } else {
    removeEffectsByKey(effectInstance.effectKey);
    _subs[effectInstance.effectKey] = effect.listen(_dispatcher.dispatch);
  }
  return this;
}