isInsideArea function
if it return true it's mean this position inside area
it's take currentPosition
from type LatLng, and vertices
List
Implementation
bool isInsideArea(dynamic currentPosition, List<dynamic> vertices) {
int intersectCount = 0;
for (int j = 0; j < vertices.length - 1; j++) {
if (_rayCastIntersect(currentPosition, vertices[j], vertices[j + 1])) {
intersectCount++;
}
}
return intersectCount.isOdd; // odd = inside, even = outside;
}