CustomImage constructor Null safety

const CustomImage(
  1. {Key? key,
  2. @required String? url,
  3. double? width,
  4. double? height,
  5. BorderRadius? borderRadius,
  6. String? errorAssets,
  7. BoxFit? fit = BoxFit.cover,
  8. bool? zoomOnTap = false,
  9. bool showBlackGradient = false,
  10. BoxShape? boxShape}
)

Implementation

const CustomImage({
  Key? key,
  @required this.url,
  this.width,
  this.height,
  this.borderRadius,
  this.errorAssets,
  this.fit = BoxFit.cover,
  this.zoomOnTap = false,
  this.showBlackGradient = false,
  this.boxShape,
}) : super(key: key);