Skip to content
pubscout

flutter_geo_hash

0.0.7, released 2 months ago by fendomoney.com

Geohash encoding, decoding, neighbors, and distance helpers for Dart and Flutter.

WASM-ready
$ flutter pub add flutter_geo_hash
Source repository

What it does

Provides utilities to encode and decode locations to and from geohashes, find neighboring cells, calculate distances, and query Cloud Firestore databases by radius using string range queries.

AI-written summary of version 0.0.7, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to query location-based data within a radius in Cloud Firestore.
  • You want to encode and decode geohashes compatible with Firebase's geofire-common.
  • You need a pure Dart solution that works across all platforms including the web.

Skip it when

  • You require complex spatial queries that only a native database backend can provide.
  • You need an entire out-of-the-box maps UI component instead of raw geolocation math.

Strengths

  • Compatible with Firebase geofire-common for cross-platform web and mobile queries.
  • Pure Dart implementation with no dependencies, running on all platforms.
  • No class name collisions with cloud_firestore or popular map packages.

Weaknesses

  • Geohash range queries can produce false positives that must be filtered out manually by distance.
  • Query performance degrades for very large radii or near polar regions.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
0

not documented

import 'package:flutter_geo_hash/flutter_geo_hash.dart';

void main() {
  final geoHash = GeoHashUtils();
  const london = GeoHashPoint(51.5074, -0.1278);
  geoHash.geoHashForLocation(london, precision: 5);
}

Alternatives

Packages that do the same job and could replace flutter_geo_hash.