DecorationImageToo constructor
const
DecorationImageToo({
- required ImageProvider<
Object> image, - ImageErrorListener? onError,
- BoxFit? fit,
- double scale = 1.0,
- AlignmentGeometry alignment = Alignment.center,
- Repeat repeatMode = Repeat.noRepeat,
- Offset mirrorOffset = Offset.zero,
- ColorFilter? colorFilter,
- Rect? centerSlice,
- bool matchTextDirection = false,
Creates an image to show in a BoxDecoration which supports the Repeat rendering modes including Repeat.mirror.
The image, alignment, repeatMode, and matchTextDirection arguments
must not be null
.
Like all package:img
classes, alignment
is ignored and forced
Alignment.center if repeat is set to Repeat.mirror,
Repeat.mirrorX, or Repeat.mirrorY.
- To align/position the seamlessly-tiling image in this situation, employ an Offset in the mirrorOffset field.
- This is a workaround for now and only aids in shifting a
Repeat.mirror
tiled image that is meant to fill an entire space.
See paintImageToo for a description of the meaning of these arguments.
Implementation
const DecorationImageToo({
required this.image,
this.onError,
this.fit,
this.scale = 1.0,
this.alignment = Alignment.center,
this.repeatMode = Repeat.noRepeat,
this.mirrorOffset = Offset.zero,
this.colorFilter,
this.centerSlice,
this.matchTextDirection = false,
});