customMarker function

Marker customMarker(
  1. LatLng? latLng,
  2. void drag(
    1. LatLng
    )?, {
  3. MarkerColor markerColor = MarkerColor.red,
})

Custom Marker

Implementation

Marker customMarker(
  LatLng? latLng,
  void Function(LatLng)? drag, {
  MarkerColor markerColor = MarkerColor.red,
}) =>
    Marker(
      draggable: true,
      onDragEnd: drag,
      markerId: const MarkerId('0'),
      position: latLng!,
      icon: colors[markerColor]!,
    );