fix: Include 90, -90 in valid lat range and 180, -180 in valid lng range (#1394)

This commit is contained in:
Neeraj Gupta 2023-09-12 10:49:07 +05:30 committed by GitHub
commit fdf1f1b66d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -42,10 +42,10 @@ class Location with _$Location {
if (longitude.isNaN || longitude.isInfinite) {
return false;
}
if (latitude > 90 || latitude < -90) {
if (latitude >= 90 || latitude <= -90) {
return false;
}
if (longitude > 180 || longitude < -180) {
if (longitude >= 180 || longitude <= -180) {
return false;
}
return true;