flutterby icon indicating copy to clipboard operation
flutterby copied to clipboard

MultiProvider pattern - Model examples

Open shaktee opened this issue 5 years ago • 0 comments

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?

shaktee avatar Jan 02 '21 19:01 shaktee