DecorationImage constructor Null safety
- {required ImageProvider<
Object> image, - ImageErrorListener? onError,
- ColorFilter? colorFilter,
- BoxFit? fit,
- AlignmentGeometry alignment = Alignment.center,
- Rect? centerSlice,
- ImageRepeat repeat = ImageRepeat.noRepeat,
- bool matchTextDirection = false,
- double scale = 1.0,
- double opacity = 1.0,
- FilterQuality filterQuality = FilterQuality.low,
- bool invertColors = false,
- bool isAntiAlias = 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.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.low,
this.invertColors = false,
this.isAntiAlias = false,
}) : assert(image != null),
assert(alignment != null),
assert(repeat != null),
assert(matchTextDirection != null),
assert(scale != null);