Answers for "access single document with its id flutter"

0

access single document with its id flutter

Widget build(BuildContext context) {
  return new StreamBuilder(
      stream: Firestore.instance.collection('COLLECTION_NAME').document('TESTID1').snapshots(),
      builder: (context, snapshot) {
        if (!snapshot.hasData) {
          return new Text("Loading");
        }
        var userDocument = snapshot.data;
        return new Text(userDocument["name"]);
      }
  );
}
Posted by: Guest on October-19-2020

Code answers related to "access single document with its id flutter"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language