ImageOverlay constructor

ImageOverlay(
  1. dynamic image, {
  2. Key? key,
  3. dynamic bounds,
  4. ImageProvider<Object>? imageError,
  5. double opacity = 1.0,
  6. double rotation = 0.0,
  7. BoxFit fit = BoxFit.cover,
  8. bool gaplessPlayback = true,
  9. dynamic data,
  10. InteractiveLayerOptions? options,
})

Implementation

ImageOverlay(
  dynamic image, {
  Key? key,
  dynamic bounds,
  this.imageError,
  this.opacity = 1.0,
  this.rotation = 0.0,
  this.fit = BoxFit.cover,
  this.gaplessPlayback = true,
  this.data,
  InteractiveLayerOptions? options,
})  : assert((image is String || image is ImageProvider) && bounds != null),
      imagePath = image is String ? image : null,
      imageFile = image is File ? image : null,
      imageProvider = image is ImageProvider ? image : null,
      image = image is Image ? image : null,
      bounds = LatLngBounds.from(bounds),
      super(key: key, options: options);