如何在firebase select条件中查询日期为datenow的位置

如何在firebase select条件中查询日期为datenow的位置,firebase,flutter,google-cloud-firestore,Firebase,Flutter,Google Cloud Firestore,我正在尝试在我的颤振应用程序中查询,以显示按日期排序的用户输入数据。我试过这个 Stream<QuerySnapshot> getUserWorshipSnapshots(BuildContext context) async*{ //final Long server_timestamp = new DateTime.now().isUtc; var currentTime = new DateTime.now(); final FirebaseUser user = await

我正在尝试在我的颤振应用程序中查询,以显示按日期排序的用户输入数据。我试过这个

Stream<QuerySnapshot> getUserWorshipSnapshots(BuildContext context) async*{
//final Long server_timestamp = new DateTime.now().isUtc;
var currentTime = new DateTime.now();
final FirebaseUser user = await _auth.currentUser();
final uid = user.uid;
yield* Firestore.instance.collection('user').document(uid).collection('worship').orderBy('dateTime')
.startAt(currentTime).snapshots();}
Stream getusersnapshots(BuildContext上下文)异步*{
//final Long server_timestamp=new DateTime.now().isUtc;
var currentTime=new DateTime.now();
最终FirebaseUser用户=等待_auth.currentUser();
最终uid=user.uid;
yield*Firestore.instance.collection('user')。document(uid)。collection('substance')。orderBy('dateTime'))
.startAt(currentTime).snapshots();}

,我的firebase结构是这样的。有什么想法吗?谢谢

您有一个
用户
集合,而不是
用户
集合,因此请添加缺少的
s

yield* Firestore.instance.collection('users').document(uid).collection('worship').orderBy('dateTime')

在堆栈溢出时,请不要显示代码的图片。将代码复制到问题本身并格式化,以便阅读、复制和搜索。请将代码添加为文本而不是图像好的。我很抱歉。已经编辑好了吗?你检查过我的答案了吗?谢谢,我的打字错误。是的,但这里的主要问题还是一样的。仍然无法显示基于当前datenow的礼拜集合。您能够检索任何数据吗?你有没有检查uid是否为空是的,它显示来自firebase的数据。问题是我只想让它显示当前日期的数据所在的数据。不是前一天。