boxImage static method
BoxDecoration
boxImage(
- ImageProvider<
Object> image, { - double radius = 0,
- List<
BoxShadow> ? boxShadow, - Color? color,
- BoxFit? fit,
- BorderRadius? borderRadius,
- Gradient? gradient,
- 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,
);
}