paint abstract method

void paint(
  1. Canvas canvas,
  2. Rect rect,
  3. Path? clipPath,
  4. ImageConfiguration configuration, {
  5. double blend = 1.0,
  6. BlendMode blendMode = BlendMode.srcOver,
})

Draw the image onto the given canvas.

The image is drawn at the position and size given by the rect argument.

The image is clipped to the given clipPath, if any.

The configuration object is used to resolve the image (e.g. to pick resolution-specific assets), and to implement the DecorationImage.matchTextDirection feature.

If the image needs to be painted again, e.g. because it is animated or because it had not yet been loaded the first time this method was called, then the onChanged callback passed to DecorationImage.createPainter will be called.

The blend argument specifies the opacity that should be applied to the image due to this image being blended with another. The blendMode argument can be specified to override the DecorationImagePainter's default BlendMode behavior. It is usually set to BlendMode.srcOver if this is the first or only image being blended, and BlendMode.plus if it is being blended with an image below.

Implementation

void paint(Canvas canvas, Rect rect, Path? clipPath, ImageConfiguration configuration, { double blend = 1.0, BlendMode blendMode = BlendMode.srcOver });