Datetime saved as String in Firebase Firestore
I have quite a bit of data in Firebase Firestore that has its createdDate field saved as an ISO 8601 String (2024-05-15T18:08:30.825890). I did not have a need to perform any date comparisons before now but this is now a requirement for my application. The problem is, when I perform date comparison on the field for example var usersSnapshot = await FirebaseFirestore.instance.collection("users").where('dateCreated', isGreaterThan: dateCreated).get()
I get 0 results. I suspect this is because the field in my firestore is saved with type string and not type timestamp.
How do I pull an array from a Firestore document and convert it into a list of objects in flutter?
In my document, I have an array
of notes. Each note has the writer, the note text, etc. I wrote the notes using a class called Note
. I would like to pull just the notes from the document
and convert them into a List
of Notes
.
Firestore stream not updating after security rules have been added
Why does my realtime stream not update when I add in my security rules? No error is returned and the stream is not triggered.
Firestore stream not updating after security rules have been added
Why does my realtime stream not update when I add in my security rules? No error is returned and the stream is not triggered.
Firestore stream not updating after security rules have been added
Why does my realtime stream not update when I add in my security rules? No error is returned and the stream is not triggered.
Firestore stream not updating after security rules have been added
Why does my realtime stream not update when I add in my security rules? No error is returned and the stream is not triggered.
Flutter search date by date range
I have saved data in my Firestore database as DateTime.now().millisecondsSinceEpoch;
Why firestore create dynamic index for all userId
return firestore .collection(‘chatrooms’) .where(‘participants’, arrayContains: userId) .where(‘chatType’, isEqualTo: ‘friend’) .where(‘visibility.$userId.visible’, isEqualTo: true) .orderBy(‘lastMessageTime.$userId’, descending: true) .snapshots() and now its creating the composite index like this. participants Arrays chatType Ascending visibility.8YvAhlkrD6Qzcu3XgXTdJxInghF2.visible Ascending lastMessageTime.8YvAhlkrD6Qzcu3XgXTdJxInghF2 Descending __name__ Descending i want that this will not happen. flutter google-cloud-firestore 1
Data is not showing correspondently after retrieve from firestore
When ‘selectedNumbers’, ‘fRAmount’, ‘sRAmount’ is retrieved from Firestore its not showing correspondently. I attached screenshot how its showing before saved to Firestore and after retrieve. I alos attached screenshot of Firestore.
Why Firestore on FLutter causing “reciever can be null” Error?
I watched the Tutorial from Google about Firestore, but i came up with problems about “null exception”. I imported the package and all, but i dont get the answer.