isClosedPolygon static method

bool isClosedPolygon(
  1. List<LatLng> poly
)

Returns true if the provided list of points is a closed polygon (i.e., the first and last points are the same), and false if it is not

@param poly polyline or polygon @return true if the provided list of points is a closed polygon (i.e., the first and last points are the same), and false if it is not

Implementation

static bool isClosedPolygon(List<LatLng> poly) => poly.first == poly.last;