I want use provider (ChangeNotifierProvider) and ChangeNotifier for manage app state. But how I can access state from one model in another model?
Use case: In chat app, one model for store user information. Other model use user information (for example user id) to make call to database (Firestore) and get stream of chat data.
For example:
class Model1 extends ChangeNotifier {
final List<Item> items = [];
class Model2 extends ChangeNotifier {
//Access items from Model1 here
items;
Is this possible? I not like have very big Model because is hard to maintain.
Thanks!