Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MultiProvider pattern - Model examples #3

Open
shaktee opened this issue Jan 2, 2021 · 0 comments
Open

MultiProvider pattern - Model examples #3

shaktee opened this issue Jan 2, 2021 · 0 comments

Comments

@shaktee
Copy link

shaktee commented Jan 2, 2021

Thank you for this wonderful example. However, I see a couple of things missing. Having those will give us a more complete picture.

Stream<MyUserModel> userStream => FirebaseAuth
  .instance
  .onAuthStateChanged
  .map((user) => MyUserModel.fromFirebase(user));

String documentPath = 'my/document';
Stream<MyDocumentModel> documentStream = Firestore.instance
    .document(documentPath)
    .snapshots()
    .map((snapshot) => MyDocumentModel.fromFirebase(snapshot));

Can you add code that adds MyUserModel and MyDocumentModel?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant