We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Anyone uses json serializable with GeoFlutterFire's GeoFirePoint?
I suspect we would need a custom JsonConverter for the data? Any tips or code samples?
The GeoPointConverter here works fine https://stackoverflow.com/questions/61707320/how-to-serialize-geopoint-using-dart-json-serializable-package , but here we have geohash too
The text was updated successfully, but these errors were encountered:
Hi @giorgio79, it's not that difficult.
You can just set a custom fromJson / toJson on the field of your serializable model. For instance, my working example is:
fromJson
toJson
@JsonKey(toJson: LocationHelper.geoFirePointToJson, fromJson: LocationHelper.geoFirePointFromJson) GeoFirePoint? geoPoint;
Here you can find my LocationHelper.
LocationHelper
P.S.: @zeusbaba, I think you should close this issue as not relevant.
Sorry, something went wrong.
@emiliodallatorre LocationHelper isn't available in Flutter with this package. Can you provide its flutter code for serialization?
No branches or pull requests
Anyone uses json serializable with GeoFlutterFire's GeoFirePoint?
I suspect we would need a custom JsonConverter for the data? Any tips or code samples?
The GeoPointConverter here works fine https://stackoverflow.com/questions/61707320/how-to-serialize-geopoint-using-dart-json-serializable-package , but here we have geohash too
The text was updated successfully, but these errors were encountered: