LatLng constructor

LatLng(
  1. double latitude,
  2. double longitude
)

Creates a point with the provided latitude and longitude coordinates.

Implementation

LatLng(this.latitude, this.longitude) {
  if (latitude < -90 ||
      latitude > 90 ||
      longitude < -180 ||
      longitude > 180) {
    throw ArgumentError();
  }
}