DecorationImage constructor

const DecorationImage({
  1. required ImageProvider<Object> image,
  2. ImageProvider<Object>? placeholder,
  3. ImageErrorListener? onError,
  4. ColorFilter? colorFilter,
  5. BoxFit? fit,
  6. AlignmentGeometry alignment = Alignment.center,
  7. Rect? centerSlice,
  8. ImageRepeat repeat = ImageRepeat.noRepeat,
  9. bool matchTextDirection = false,
  10. double scale = 1.0,
  11. double opacity = 1.0,
  12. FilterQuality filterQuality = FilterQuality.medium,
  13. bool invertColors = false,
  14. bool isAntiAlias = false,
})

Creates an image to show in a BoxDecoration.

Implementation

const DecorationImage({
  required this.image,
  this.placeholder,
  this.onError,
  this.colorFilter,
  this.fit,
  this.alignment = Alignment.center,
  this.centerSlice,
  this.repeat = ImageRepeat.noRepeat,
  this.matchTextDirection = false,
  this.scale = 1.0,
  this.opacity = 1.0,
  this.filterQuality = FilterQuality.medium,
  this.invertColors = false,
  this.isAntiAlias = false,
});