I’m a bit inexperienced with Firebase data output I have a query in firestore for a data counter in a collection it looks like this (taken and slightly corrected from the official documentation)
final fs = FirebaseFirestore.instance;
fs.collection("users").count().get().then((users) => print('${users.count}'),
);
Help with its output in Text() Classical output of specific data from a collection is clear to me, but here any attempt leads me into a stupor, I am not a very strong expert in Flutter and would like to see a small example of how I can implement it
2
Answers
Anyway, what worked for me was
you can use Future Builder :
https://api.flutter.dev/flutter/widgets/FutureBuilder-class.html