GroundOverlay constructor

const GroundOverlay({
  1. required GroundOverlayId groundOverlayId,
  2. bool consumeTapEvents = false,
  3. LatLng? location,
  4. int zIndex = 0,
  5. VoidCallback? onTap,
  6. bool visible = true,
  7. BitmapDescriptor? bitmap,
  8. LatLngBounds? bounds,
  9. double? width,
  10. double? height,
  11. double bearing = 0.0,
  12. Offset anchor = Offset.zero,
  13. double opacity = 1.0,
})

Creates an immutable representation of a GroundOverlay to draw on GoogleMap. The following ground overlay positioning is allowed by the Google Maps Api

  1. Using height, width and LatLng
  2. Using width, width
  3. Using LatLngBounds

Implementation

const GroundOverlay({
  required this.groundOverlayId,
  this.consumeTapEvents = false,
  this.location,
  this.zIndex = 0,
  this.onTap,
  this.visible = true,
  this.bitmap,
  this.bounds,
  this.width,
  this.height,
  this.bearing = 0.0,
  this.anchor = Offset.zero,
  this.opacity = 1.0,
})  : assert(
          (height != null && width != null && location != null && bounds == null) ||
              (height == null && width == null && location == null && bounds != null) ||
              (height == null && width != null && location != null && bounds == null) ||
              (height == null && width == null && location == null && bounds == null),
          "Only one of the three types of positioning is allowed, please refer "
          "to the https://developers.google.com/maps/documentation/android-sdk/groundoverlay#add_an_overlay"),
      assert(0.0 <= opacity && opacity <= 1.0);