[Solved] How to get specific document data from firebase and return as a string


It works for me

Widget build(BuildContext context) {
  return new StreamBuilder(
      stream: Firestore.instance.collection('COLLECTION_NAME').document('TEST').snapshots(),
      builder: (context, snapshot) {
        if (!snapshot.hasData) {
          return Center(child: CircularProgressIndicator());
        }
        var userDocument = snapshot.data;
        return new Text(userDocument["property_name"]);
      }
  );
}

1

solved How to get specific document data from firebase and return as a string