customMarker function

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

Custom Marker

Implementation

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