asConnectFluxStore method

ConnectFluxAdapterStore<S> asConnectFluxStore(
  1. dynamic actions, {
  2. List<Middleware<S>>? middleware,
})

Returns a ConnectFluxAdapterStore instance from the Flux store instance.

This is meant to be a more succinct way to instantiate the adapter store.

Implementation

ConnectFluxAdapterStore<S> asConnectFluxStore(dynamic actions,
    {List<redux.Middleware<S>>? middleware}) {
  if (this is InfluxStoreMixin) {
    throw ArgumentError.value(
        'instance of InfluxStoreMixin',
        'object ancestor',
        '`asConnectFluxStore` should not be used when the store is implementing InfluxStoreMixin. Use `asReduxStore` instead');
  }

  return _connectFluxAdapterFor.putIfAbsentCasted(this, () => ConnectFluxAdapterStore(this, actions, middleware: middleware));
}