boxDecorated method

DecoratedBox boxDecorated({
  1. Color? color,
  2. BoxBorder? border,
  3. double? radiusAll,
  4. BoxShadow? shadow,
  5. BorderRadiusGeometry? borderRadius,
  6. List<BoxShadow>? boxShadow,
  7. DecorationImage? image,
  8. Gradient? gradient,
  9. BlendMode? backgroundBlendMode,
  10. 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,
      ));
}