boxDecorationWithRoundedCorners function

Decoration boxDecorationWithRoundedCorners({
  1. Color backgroundColor = whiteColor,
  2. BorderRadius? borderRadius,
  3. LinearGradient? gradient,
  4. BoxBorder? border,
  5. List<BoxShadow>? boxShadow,
  6. DecorationImage? decorationImage,
  7. BoxShape boxShape = BoxShape.rectangle,
})

rounded box decoration

Implementation

Decoration boxDecorationWithRoundedCorners({
  Color backgroundColor = whiteColor,
  BorderRadius? borderRadius,
  LinearGradient? gradient,
  BoxBorder? border,
  List<BoxShadow>? boxShadow,
  DecorationImage? decorationImage,
  BoxShape boxShape = BoxShape.rectangle,
}) {
  return BoxDecoration(
    color: backgroundColor,
    borderRadius:
        boxShape == BoxShape.circle ? null : (borderRadius ?? radius()),
    gradient: gradient,
    border: border,
    boxShadow: boxShadow,
    image: decorationImage,
    shape: boxShape,
  );
}