GeoPoint constructor
Create a point from a lon
gitude and lat
gitude.
lon
must be between -180 and 180, and lat
must be between -90 and 90.
Implementation
GeoPoint({required this.lon, required this.lat}) {
if (lon < -180 || lon > 180) throw ArgumentError.value(lon, 'lon', 'must be between -180 and 180');
if (lat < -90 || lat > 90) throw ArgumentError.value(lat, 'lat', 'must be between -90 and 90');
}