【发布时间】:2021-01-12 17:33:26
【问题描述】:
这是我的搜索代码。我正在使用此代码从 Firestore 获取卡。我正在尝试设置按日期排序我的卡片。
我该怎么做。感谢您的帮助。
class SearchService {
List<Future<QuerySnapshot>> searchByName() {
return [
Firestore.instance
.collection('dis')
.where('no')
.getDocuments(),
];
}
}
【问题讨论】:
-
您查询的“否”是什么?顺便说一句,在 Flutter Firestore 中查看这个查询:Flutter Firestore stackoverflow.com/questions/48937864/…
-
它的字符串编号如 123456
-
那么,你是如何根据日期排序的??
-
我可以将“否”更改为时间戳,但我仍然不知道如何按日期排序
标签: android firebase flutter dart google-cloud-firestore