From 27a0c2a78fdd82c29e70aeb9e738a09942a963e3 Mon Sep 17 00:00:00 2001 From: Thi Dinh Date: Sat, 5 Mar 2022 15:36:21 +0200 Subject: [PATCH] fix: all return values are duplicate if radius is > 1000 --- lib/src/collection/base.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/src/collection/base.dart b/lib/src/collection/base.dart index e521141..701850f 100644 --- a/lib/src/collection/base.dart +++ b/lib/src/collection/base.dart @@ -115,7 +115,9 @@ class BaseGeoFireCollectionRef { final precision = MathUtils.setPrecision(radius); final centerHash = center.hash.substring(0, precision); - final area = GeoFirePoint.neighborsOf(hash: centerHash)..add(centerHash); + final area = Set.from( + GeoFirePoint.neighborsOf(hash: centerHash)..add(centerHash), + ).toList(); final queries = area.map((hash) { final tempQuery = _queryPoint(hash, field);