'Combining StoreProvider and StoreConnector

Does a better form for such a combination of a StoreProvider and just inside the fitting StoreConnector exist?

StoreProvider<SingleBoolValueModel>(
  store: myModelGlobalUpdate,
  child: StoreConnector<SingleBoolValueModel, void Function(AppAction)>(
          converter: (store) => (aa) => store.dispatch(aa),
          builder: (context, callback) { 
                  return SomeWidget() 
                  }
                )
     ) 

Uses the flutter_redux package.

In seldom cases, I need global store just to redraw the whole tree of Widgets. Therefore the SingleBoolValueModel, which just contains a single bool property.

Maybe, this is even an anti-pattern. It is?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source