String map = widget.list[widget.index]['map'];
地图数据的示例"[LatLng(12.82879876203614, 80.12908793985844),LatLng(12.83370395257544, 80.1245865225792),LatLng(12.839642030904889, 80.12061484158039),]"
现在是字符串,但我想要 LatLng 格式(不带“”双引号),例如[LatLng(12.82879876203614, 80.12908793985844),LatLng(12.83370395257544, 80.1245865225792),LatLng(12.839642030904889, 80.12061484158039),]
Set<Polygon> polygonSet = new Set();
polygonSet.add(Polygon(
polygonId: PolygonId('test'),
points: map,
strokeWidth: 2,
strokeColor: Colors.blue,
fillColor: Colors.blue.withOpacity(0.4),));
return polygonSet;
}
输出错误:type 'String' is not a subtype of type 'LatLng'