isNeighbor method

bool isNeighbor(
  1. String geohash
)

Returns true if given geohash is equal to or is a neighbor of this one.

Implementation

bool isNeighbor(String geohash) {
  if (geohash.length != _geohash.length) return false;

  bool contains = false;
  _neighbors.forEach((key, value) {
    if (value == geohash) contains = true;
  });

  return contains;
}