Widget.image constructor Null safety

const Widget.image(
  1. {Key? key,
  2. required ImageProvider image,
  3. String? semanticLabel,
  4. @Default(false) bool excludeFromSemantics,
  5. double? width,
  6. double? height,
  7. Color? color,
  8. BlendMode? colorBlendMode,
  9. BoxFit? fit,
  10. @Default(Alignment.center) Alignment alignment,
  11. @Default(ImageRepeat.noRepeat) ImageRepeat repeat,
  12. Rect? centerSlice,
  13. @Default(false) bool matchTextDirection,
  14. @Default(false) bool gaplessPlayback,
  15. @Default(false) bool isAntiAlias,
  16. @Default(FilterQuality.low) FilterQuality filterQuality}
)

Implementation

const factory Widget.image({
  Key? key,
  required ImageProvider image,
  String? semanticLabel,
  @Default(false) bool excludeFromSemantics,
  double? width,
  double? height,
  Color? color,
  BlendMode? colorBlendMode,
  BoxFit? fit,
  @Default(Alignment.center) Alignment alignment,
  @Default(ImageRepeat.noRepeat) ImageRepeat repeat,
  Rect? centerSlice,
  @Default(false) bool matchTextDirection,
  @Default(false) bool gaplessPlayback,
  @Default(false) bool isAntiAlias,
  @Default(FilterQuality.low) FilterQuality filterQuality,
}) = Image;