whereNear method
LCSearchSortBuilder
whereNear(
- String key,
- LCGeoPoint point, {
- String? order,
- String? mode,
- String? unit,
Implementation
LCSearchSortBuilder whereNear(String key, LCGeoPoint point, { String? order, String? mode, String? unit }) {
_fields.add({
'_geo_distance': {
key: {
'lat': point.latitude,
'lon': point.longitude
},
'order': order ?? 'asc',
'mode': mode ?? 'avg',
'unit': unit ?? 'km'
}
});
return this;
}