isValid property

bool get isValid

Indicates whether the coordinate contains valid latitude and longitude values.

Returns

  • true when latitude and longitude are not the internal sentinel values used to represent uninitialized coordinates; otherwise false.

Implementation

bool get isValid {
  return (latitude.toInt() != _maxInt32 && longitude.toInt() != _maxInt32) &&
      (latitude != -99999 && longitude != -99999);
}