OverlayTransformation constructor

OverlayTransformation(
  1. String imageId, {
  2. Dimensions? dimensions,
  3. OverlayCoordinates? coordinates,
  4. int? opacity,
})

Implementation

OverlayTransformation(
  this.imageId, {
  this.dimensions,
  this.coordinates,
  this.opacity,
})  : assert(dimensions != null
          ? dimensions.width > -1 && dimensions.height > -1
          : true),
      assert(coordinates != null ? dimensions != null : true,
          'dimensions should be provided if you are using `coordinates`'),
      assert(
          opacity != null
              ? dimensions != null &&
                  coordinates != null &&
                  opacity >= 0 &&
                  opacity <= 100
              : true,
          '`opacity` should be in 0..100 range');