keyByPolygonId function
Implementation
Map<String, Polygon> keyByPolygonId(Iterable<Polygon> polylines) {
// ignore: unnecessary_null_comparison
if (polylines == null) {
return <String, Polygon>{};
}
return Map<String, Polygon>.fromEntries(polylines.map((Polygon polyline) =>
MapEntry<String, Polygon>(polyline.id, polyline.clone())));
}