I'm developing a project which is somewhat large and I'm facing difficulty on implementing realtime events happening on the server. I'm using provider package, across the project and I'm having two providers with something common I mean like posts stored in one of them may or may not be on the other one. I don't have that much experience with real-time events management.
so to handle it I'm listening to messaging channel in which all important events are being sent to and one of the providers(the main one) is registered with the channel and for all rt events that provider have a reference to other providers and checking if the post included on them or not, if so it will modify it in other providers and will call notify listeners through their references And also if the post in the main provider it will be updated (Simply I'm using one of the instances of that post in the system and apply modifications to it and then unifying it across the app)
For widgets I'm using selector widget of provider package, but unfortunately it doesn't work properly for all values.
So, any suggestions or a better idea to handle the situation?
what is the commonly used way for that situation and for handling rt events generally??
Thanks