isPointInsidePolygon method

bool isPointInsidePolygon(
  1. LatLng position
)

Implementation

bool isPointInsidePolygon(LatLng position) {
  List<List<List<double>>> list = <List<List<double>>>[
    points.map((LatLng e) => e.toList()).toList(),
    ...(holePointsList ?? <List<LatLng>>[])
        .map((List<LatLng> e) => e.map((LatLng f) => f.toList()).toList())
        .toList(),
  ];
  return list.isGeoPointInPolygon(position);
}