Timestamp
objects get transformed into Map<String, dynamic>
#84
Labels
enhancement
New feature or request
Timestamp
objects get transformed into Map<String, dynamic>
#84
Is your feature request related to a problem? Please describe.
When using the official cloud_firestore SDK, any timestamps in the Firestore document get automatically converted to
Timestamp
objects. However, when using Algolia, they instead become a map that looks like{_seconds: 1643874320, _nanoseconds: 615000000}
of typeMap<String, dynamic>
. This becomes especially inconvenient when using Firestore queries next to Algolia's, since two separate deserialization functions will have to be used.Describe the solution you'd like
I would like for the Algolia SDK to leave the original Firestore Timestamp objects intact for better compatibility with the official Firestore SDK.
Describe alternatives you've considered
I considered writing separate factory constructors for
.fromFirestore
and.fromAlgolia
, but it becomes inconvenient very quickly, especially that I want to migrate to automatically generated serialization functions usingjson_serializable
.The text was updated successfully, but these errors were encountered: