Marker constructor

const Marker({
  1. required MarkerId markerId,
  2. double alpha = 1.0,
  3. bool consumeTapEvents = false,
  4. bool draggable = false,
  5. BitmapDescriptor? icon,
  6. InfoWindow infoWindow = InfoWindow.noText,
  7. LatLng position = const LatLng(0.0, 0.0),
  8. VoidCallback? onTap,
  9. bool visible = true,
  10. ValueChanged<LatLng>? onDragEnd,
})

Creates a set of marker configuration options.

Default marker options.

Specifies a marker that

  • is fully opaque; alpha is 1.0
  • has default tap handling; consumeTapEvents is false
  • is stationary; draggable is false
  • has a default icon; icon is BitmapDescriptor.defaultMarker
  • has no info window text; infoWindowText is InfoWindowText.noText
  • is positioned at 0, 0; position is LatLng(0.0, 0.0)
  • is visible; visible is true
  • is placed at the base of the drawing order; zIndex is 0.0

Implementation

const Marker({
  required this.markerId,
  this.alpha = 1.0,
  this.consumeTapEvents = false,
  this.draggable = false,
  this.icon,
  this.infoWindow = InfoWindow.noText,
  this.position = const LatLng(0.0, 0.0),
  this.onTap,
  this.visible = true,
  this.onDragEnd,
}) : assert((0.0 <= alpha && alpha <= 1.0));