addMarker static method

void addMarker(
  1. Set<Marker> markers,
  2. LatLng location
)

Implementation

static void addMarker(Set<Marker> markers, LatLng location) {
  markers.add(
    Marker(
      markerId: MarkerId(location.toString()),
      position: location,
      infoWindow: const InfoWindow(
        title: 'Searched Location',
        snippet: 'This is the location you searched before',
      ),
      icon: BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueRed),
    ),
  );
}