addWidgetMarker method

void addWidgetMarker(
  1. LatLng position,
  2. Widget widget, {
  3. String? id,
  4. Alignment alignment = Alignment.center,
})

Adds a custom Flutter widget as a marker at the given position.

The widget is overlaid on the map and automatically syncs its position.

Implementation

void addWidgetMarker(
  LatLng position,
  Widget widget, {
  String? id,
  Alignment alignment = Alignment.center,
}) {
  markers.addWidgetMarker(position, widget, id: id, alignment: alignment);
}