如何进行dart-Flatter firebase查询联接

如何进行dart-Flatter firebase查询联接,firebase,flutter,dart,google-cloud-firestore,Firebase,Flutter,Dart,Google Cloud Firestore,我有一个firestore用户表和另一个firestore博客表,每个文档上都有uid。我想在flatter中通过uid连接两个表来执行连接查询。我找不到一种方法在火灾测试状态管理中做到这一点。我想定义一个新类 BlogData<T> { final Firestore _db = Firestore.instance; final String path; CollectionReference ref; BlogData({ this.path }) {

我有一个firestore用户表和另一个firestore博客表,每个文档上都有uid。我想在flatter中通过uid连接两个表来执行连接查询。我找不到一种方法在火灾测试状态管理中做到这一点。我想定义一个新类

BlogData<T> {
  final Firestore _db = Firestore.instance;
  final String path; 
  CollectionReference ref;
  BlogData({ this.path }) {
    ref = _db.collection(path);
  }
  Future<List<T>> getData() async {
    // get blog data and do a join here to a user document by uid (document/blog.uid) return a future of blogs with user data such as name, country added to each blog in the future list.
  }
  Stream<List<T>> streamData() {
    // get blog data and do a join here to the user document  by uid (document/blog.uid) return a stream of blogs with user data such as name, country added to each blog in the stream.
  }
}
BlogData{
final Firestore _db=Firestore.instance;
最终字符串路径;
收集参考文献;
BlogData({this.path}){
ref=_db.collection(路径);
}
Future getData()异步{
//获取博客数据并在此处通过uid(document/blog.uid)连接到用户文档返回博客的未来,其中包含用户数据,如名称、国家/地区,并添加到未来列表中的每个博客。
}
streamData(){
//获取blog数据并在此处通过uid(document/blog.uid)连接到用户文档返回一个blog流,其中包含添加到流中每个blog的用户数据,如名称、国家/地区。
}
}

我如何才能做到这一点?

我不确定为什么这是firestore web/javascript查询的副本?有关
未来getData()
,请参阅我不确定为什么这是firestore web/javascript查询的副本?有关
未来getData()
,请参阅