geoBoxBody method Null safety

Map<String, dynamic> geoBoxBody(
  1. GeoBoxQuery query
)

Implementation

Map<String, dynamic> geoBoxBody(GeoBoxQuery query) {
  return {
    "geo_bounding_box": {
      query.field: {
        "top_left": {
          "lat": query.topLeft.latitude,
          "lon": query.topLeft.longitude
        },
        "bottom_right": {
          "lat": query.bottomRight.latitude,
          "lon": query.bottomRight.longitude
        }
      }
    }
  };
}