geoDistanceBody method Null safety

Map<String, dynamic> geoDistanceBody(
  1. GeoDistanceQuery query
)

Implementation

Map<String, dynamic> geoDistanceBody(GeoDistanceQuery query) {
  return {
    "geo_distance": {
      "distance": query.radius,
      query.field: {
        "lat": query.center.latitude,
        "lon": query.center.longitude,
      }
    }
  };
}