RawImage constructor Null safety

const RawImage(
  1. {Key? key,
  2. Image? image,
  3. String? debugImageLabel,
  4. double? width,
  5. double? height,
  6. double scale,
  7. Color? color,
  8. Animation<double>? opacity,
  9. BlendMode? colorBlendMode,
  10. BoxFit? fit,
  11. AlignmentGeometry alignment,
  12. ImageRepeat repeat,
  13. Rect? centerSlice,
  14. bool matchTextDirection,
  15. bool invertColors,
  16. FilterQuality filterQuality,
  17. bool isAntiAlias}
)

Creates a widget that displays an image.

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

Implementation

const RawImage({
  Key? key,
  this.image,
  this.debugImageLabel,
  this.width,
  this.height,
  this.scale = 1.0,
  this.color,
  this.opacity,
  this.colorBlendMode,
  this.fit,
  this.alignment = Alignment.center,
  this.repeat = ImageRepeat.noRepeat,
  this.centerSlice,
  this.matchTextDirection = false,
  this.invertColors = false,
  this.filterQuality = FilterQuality.low,
  this.isAntiAlias = false,
}) : assert(scale != null),
     assert(alignment != null),
     assert(repeat != null),
     assert(matchTextDirection != null),
     assert(isAntiAlias != null),
     super(key: key);