Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timestamp objects get transformed into Map<String, dynamic> #84

Open
aabounegm opened this issue Feb 4, 2022 · 0 comments
Open

Timestamp objects get transformed into Map<String, dynamic> #84

aabounegm opened this issue Feb 4, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@aabounegm
Copy link

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 type Map<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 using json_serializable.

@aabounegm aabounegm added the enhancement New feature or request label Feb 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant