boxDecorated method
DecoratedBox
boxDecorated(
{ - Color? color,
- BoxBorder? border,
- double? radiusAll,
- BoxShadow? shadow,
- BorderRadiusGeometry? borderRadius,
- List<BoxShadow>? boxShadow,
- DecorationImage? image,
- Gradient? gradient,
- BlendMode? backgroundBlendMode,
- BoxShape shape = BoxShape.rectangle,
})
Implementation
DecoratedBox boxDecorated({
Color? color,
BoxBorder? border,
double? radiusAll,
BoxShadow? shadow,
BorderRadiusGeometry? borderRadius,
List<BoxShadow>? boxShadow,
DecorationImage? image,
Gradient? gradient,
BlendMode? backgroundBlendMode,
BoxShape shape = BoxShape.rectangle,
}) {
BorderRadiusGeometry? br = borderRadius;
if (br == null && radiusAll != null) {
br = BorderRadius.all(Radius.circular(radiusAll));
}
return DecoratedBox(
child: this,
decoration: BoxDecoration(
color: color,
image: image,
border: border,
borderRadius: br,
boxShadow: boxShadow ?? (shadow == null ? null : [shadow]),
gradient: gradient,
backgroundBlendMode: backgroundBlendMode,
shape: shape,
));
}