I just started to take a look into flutter/dart. Coming from HTML5/Javascript, I wonder what would be an equivalent to:
google.maps.event.addListener(map, \
List _markers = List.generate(10, (index) {
Map result = results[index];
Map location = result["geometry"]["location"];
LatLng latLngMarker = LatLng(location["lat"], location["lng"]);
return Marker(
markerId: MarkerId("marker$index"),
position: latLngMarker,
onTap: () {
//Your code here...
},
infoWindow: InfoWindow(title: result["name"],));
});