setMarker method

void setMarker(
  1. LatLng latLng
)

Moves the marker to the indicated lat,lng

Implementation

void setMarker(LatLng latLng) {
  // markers.clear();
  setState(() {
    markers.clear();
    markers.add(
        Marker(markerId: MarkerId("selected-location"), position: latLng));
  });
}