CircularRegion class

A circular geographic region for proximity-based location filtering.

Defined by a center point and radius. Used for geofencing and "near" location queries.

final region = CircularRegion(
  radius: 5.kilometers,
  center: LocationCoordinate(latitude: 37.7749, longitude: -122.4194),
);

final isInside = region.contains(point);
Annotations
  • @JsonSerializable.new(createFactory: false)

Constructors

CircularRegion({required Distance radius, required LocationCoordinate center})
const

Properties

center → LocationCoordinate
The center coordinate of this circular region.
final
distance → double
The radius in kilometers.
no setter
hashCode → int
The hash code for this object.
no setterinherited
lat → double
The latitude of the center point.
no setter
lng → double
The longitude of the center point.
no setter
radius → Distance
The radius of this circular region.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

contains(LocationCoordinate point) → bool
Whether point is within this circular region.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Converts this circular region to JSON.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited