DecorationImage constructor

const DecorationImage({@required ImageProvider image, ColorFilter colorFilter, BoxFit fit, AlignmentGeometry alignment: Alignment.center, Rect centerSlice, ImageRepeat repeat: ImageRepeat.noRepeat, bool matchTextDirection: false })

Creates an image to show in a BoxDecoration.

The image, alignment, repeat, and matchTextDirection arguments must not be null.

Implementation

const DecorationImage({
  @required this.image,
  this.colorFilter,
  this.fit,
  this.alignment = Alignment.center,
  this.centerSlice,
  this.repeat = ImageRepeat.noRepeat,
  this.matchTextDirection = false,
}) : assert(image != null),
     assert(alignment != null),
     assert(repeat != null),
     assert(matchTextDirection != null);