Annotation constructor
Annotation({
- required AnnotationId annotationId,
- double alpha = 1.0,
- Offset anchor = const Offset(0.5, 1.0),
- bool draggable = false,
- BitmapDescriptor icon = BitmapDescriptor.defaultAnnotation,
- InfoWindow infoWindow = InfoWindow.noText,
- LatLng position = const LatLng(0.0, 0.0),
- VoidCallback? onTap,
- bool visible = true,
- double zIndex = -1,
- ValueChanged<
LatLng> ? onDragEnd,
Creates a set of annotation configuration options.
Default annotation options.
Specifies a annotation 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 default Pin Annotation
- 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
Implementation
Annotation({
required this.annotationId,
this.alpha = 1.0,
this.anchor = const Offset(0.5, 1.0),
this.draggable = false,
this.icon = BitmapDescriptor.defaultAnnotation,
this.infoWindow = InfoWindow.noText,
this.position = const LatLng(0.0, 0.0),
this.onTap,
this.visible = true,
this.zIndex = -1,
this.onDragEnd,
}) : assert(0.0 <= alpha && alpha <= 1.0);