I'm trying to query in my flutter application to show the user's input data that sort by date now. I have tried this
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();}
, and my firebase structure is like this
. is there any idea? thank you