Marker constructor
const
Marker({
- required MarkerId markerId,
- double alpha = 1.0,
- bool consumeTapEvents = false,
- bool draggable = false,
- BitmapDescriptor? icon,
- InfoWindow infoWindow = InfoWindow.noText,
- LatLng position = const LatLng(0.0, 0.0),
- VoidCallback? onTap,
- bool visible = true,
- 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
isInfoWindowText.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));