Skip to content

Commit ef46321

Browse files
committed
chore: minor update
1 parent 3c26318 commit ef46321

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/stream_core/lib/src/query/filter/filter_operation_utils.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,10 @@ extension LocationEqualityExtension on LocationCoordinate {
9999
/// Supports both [CircularRegion] objects and Map representations with
100100
/// keys: 'lat', 'lng', 'distance' (in kilometers).
101101
bool isNear(Object? other) {
102+
// Check for CircularRegion instance.
102103
if (other is CircularRegion) return other.contains(this);
103104

105+
// Check for Map representation.
104106
if (other is Map) {
105107
final lat = (other['lat'] as num?)?.toDouble();
106108
if (lat == null) return false;
@@ -127,8 +129,10 @@ extension LocationEqualityExtension on LocationCoordinate {
127129
/// Supports both [BoundingBox] objects and Map representations with
128130
/// keys: 'ne_lat', 'ne_lng', 'sw_lat', 'sw_lng'.
129131
bool isWithinBounds(Object? other) {
132+
// Check for BoundingBox instance.
130133
if (other is BoundingBox) return other.contains(this);
131134

135+
// Check for Map representation.
132136
if (other is Map) {
133137
final neLat = (other['ne_lat'] as num?)?.toDouble();
134138
if (neLat == null) return false;

0 commit comments

Comments
 (0)