flutter - 如何根据 dart 中另一个 Stream 的数据创建一个新的 Stream?
问题描述
我创建了一个流,它返回包含 Firestore 中特定字段的特定文档列表。基于此 Stream,我想创建另一个使用第一个流中的数据的流,以从 Firestore 中检索一些其他数据。这怎么可能?
这是流
Stream<List<EsportsMatch>> get csgoMatches {
String formattedDate = DateFormat('yyyy-MM-dd').format(DateTime.now());
print(formattedDate);
return db
.collection("matches")
.where("@type", isEqualTo: "CS GO")
.snapshots()
.map((_csgoMatchesFromSnapshot));
}
解决方案
推荐阅读
- python - 在包 __init__.py 中导入的模块不可访问
- javascript - 如何在函数执行期间停止函数 - JavaScript
- c# - 如何将保存为字符串(base64?)的数组对象转换为 C# 数组或 sql 表?
- oauth-2.0 - Microsoft Graph Oauth2 - 获取:“401 - 未经授权:访问因凭据无效而被拒绝”
- laravel - 在 php 7.0 上使用 Laravel
- reactjs.net - ReactJS - 不同文件中的应用程序功能
- c# - 在 ASP.NET Web 应用程序之外获取 UserManager 实例?
- postgresql - PostgreSQL 连接需要有效的客户端证书
- mysql - Payara 无法在 localhost 上创建与数据库服务器的连接
- r - 用r visnetwork包中的值和宽度控制边缘宽度