I am developing a forum application. There are two collections related to user information and topic information in my Firebase database.
In the forumTopics collection, I keep the data on each forum topic.
When I make a Firebase query, I want to get the data of this topic along with the data of the user corresponding to the topicAuthorUID value.
For example, I want to extract the name, avatar information from the document of the user whose topicAuthorUID value is XXX in the userData collection.
The query I use to get topics:
Future getForumTopics() async {
final result =
await Firestore.instance.collection('forumTopics').getDocuments();
return result.documents;
}
But with this query, I cannot get the name and avatar of the topic's owner.
In summary, I want to print the subject information and the user's name and avatar information.
What query do I need to do to do this? Please help me. Thank you.


