Marker constructor

Marker({
  1. required LatLng position,
  2. bool flat = true,
  3. double alpha = 1.0,
  4. Offset? anchor,
  5. bool clickable = true,
  6. bool draggable = false,
  7. BitmapDescriptor? icon = BitmapDescriptor.defaultMarker,
  8. bool infoWindowEnable = true,
  9. InfoWindow infoWindow = InfoWindow.noText,
  10. double rotation = 0.0,
  11. bool visible = true,
  12. double zIndex = 0.0,
  13. ArgumentCallback<String>? onTap,
  14. MarkerDragEndCallback? onDragEnd,
})

Implementation

Marker({
  required this.position,
  this.flat = true,
  double alpha = 1.0,
  Offset? anchor,
  this.clickable = true,
  this.draggable = false,
  this.icon = BitmapDescriptor.defaultMarker,
  this.infoWindowEnable = true,
  this.infoWindow = InfoWindow.noText,
  this.rotation = 0.0,
  this.visible = true,
  this.zIndex = 0.0,
  this.onTap,
  this.onDragEnd,
})  : alpha =
          // ignore: unnecessary_null_comparison
          (alpha != null ? (alpha < 0 ? 0 : (alpha > 1 ? 1 : alpha)) : alpha),
      // ignore: unnecessary_null_comparison
      anchor = (anchor == null
          ?   Offset(0.5, 1.0)
          : ((anchor.dx < 0 || anchor.dx > 1 || anchor.dy < 0 || anchor.dy > 1) ?  Offset(0.5, 1.0) : anchor)),
      super();