Want to retrieve specific user details from firestore with flutter? Your method is marked as async so you have to wait for the result:
1 2 3 4 5 6 7 | Future<void> _userDetails(userID) async { final userDetails = await getData(userID); setState(() { firstName = userDetails.toString(); new Text(firstName); }); } |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.