【发布时间】:2021-07-20 16:18:51
【问题描述】:
我正在尝试获取 callerId 字段不包含空值的文档
我试试这个
final collection =
_firestoreService.instance.collection(TIME_SLOTS_COLLECTION_NAME);
Query query = collection
.where("listenerId", isEqualTo: _userService.user!.firestoreId!)
.where("callerId", isNull: false)
.orderBy("startTime", descending: true);
print("after query");
但它什么也没返回。此语句之后的代码根本不运行。这意味着after query 不会打印在控制台上。不知道有什么问题?
我试过了
final collection =
_firestoreService.instance.collection(TIME_SLOTS_COLLECTION_NAME);
Query query = collection
.where("listenerId", isEqualTo: _userService.user!.firestoreId!)
.where("callerId", isEqualTo: "caller1")
.orderBy("startTime", descending: true);
print("after query");
它运行但第一个没有。有人知道吗?
【问题讨论】:
标签: firebase flutter google-cloud-firestore