zubairehman / flutter_boilerplate_project

A boilerplate project created in flutter using MobX and Provider.
http://zubairehman.surge.sh/
MIT License
2.26k stars 908 forks source link

How can we do intercommunication between stores? #71

Closed jashwant closed 3 years ago

jashwant commented 3 years ago

I want to access 1 store inside another store.

I find it easier to create a rootStore and pass the rootStore reference to each store.

But how can I do the same with DI architecture used in this project ?

This is my first time using DI, so pardon my lack of experience.

zubairehman commented 3 years ago

Hi @jashwant,

In my opinion, it's not recommended that one store can have access to or talk directly to another store. Instead, you can pass your dependencies from your views. I would be happy to help if you share your usecase.

Thanks.