boxImage static method

BoxDecoration boxImage(
  1. ImageProvider<Object> image, {
  2. double radius = 0,
  3. List<BoxShadow>? boxShadow,
  4. Color? color,
  5. BoxFit? fit,
  6. BorderRadius? borderRadius,
  7. Gradient? gradient,
  8. Alignment? alignment,
})

Implementation

static BoxDecoration boxImage(
  ImageProvider image, {
  double radius = 0,
  List<BoxShadow>? boxShadow,
  Color? color,
  BoxFit? fit,
  BorderRadius? borderRadius,
  Gradient? gradient,
  Alignment? alignment,
}) {
  return BoxDecoration(
    image: DecorationImage(
      image: image,
      fit: fit ?? BoxFit.fill,
      alignment: alignment ?? Alignment.center,
    ),
    borderRadius: borderRadius ?? BorderRadius.circular(radius),
    boxShadow: boxShadow,
    color: color,
    gradient: gradient,
  );
}