isLatLong function

bool isLatLong(
  1. String str
)

Checks if the string is a valid latitude,longitude pair.

Latitude must be in the range -90 to 90 and longitude in the range -180 to 180. The two values are separated by a comma.

Example:

isLatLong('40.7128,-74.0060'); // true
isLatLong('0,0'); // true
isLatLong('91,0'); // false (latitude out of range)

Implementation

bool isLatLong(String str) => _isLatLong(str);