I am trying to build a basic Flutter app where people can swap items (kind of like the Olio app) but I am getting stuck with regards to listings where they only show within a certain radius.
User 1 uploads details of the item they wish to swap (this includes the users UK postcode) to a firebase realtime database.
User 2 wishes to see what items are within their selected search criteria (i.e. within 20 miles).
I'm trying to figure out an efficient way of performing this search? At the moment I just return all items from the realtime database, but need it so that the only items that are returned are that of items within the distance range.
Do I need to download all items (this could be a very large list) and then check each item against a google maps api? This seems very inefficient!
I would really appreciate any pointers in the right direction.