Created
November 2, 2023 09:54
-
-
Save emiliodallatorre/2ff10fe2bee09dd27f8fa828b52417c5 to your computer and use it in GitHub Desktop.
Revisions
-
emiliodallatorre created this gist
Nov 2, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:geoflutterfire2/geoflutterfire2.dart'; class LocationHelper { static Map<String, dynamic> geoFirePointToJson(final GeoFirePoint? geoFirePoint) { return geoFirePoint?.data; } static GeoFirePoint? geoFirePointFromJson(final Map<String, dynamic>? json) { if (json == null) { return null; } final GeoPoint geoPoint = json["geopoint"] as GeoPoint; return GeoFirePoint(geoPoint.latitude, geoPoint.longitude); } }