boxDecorationWithShadow function

Decoration boxDecorationWithShadow({
  1. Color backgroundColor = whiteColor,
  2. Color? shadowColor,
  3. double? blurRadius,
  4. double? spreadRadius,
  5. Offset offset = const Offset(0.0, 0.0),
  6. LinearGradient? gradient,
  7. BoxBorder? border,
  8. List<BoxShadow>? boxShadow,
  9. DecorationImage? decorationImage,
  10. BoxShape boxShape = BoxShape.rectangle,
  11. BorderRadius? borderRadius,
})

box decoration with shadow

Implementation

Decoration boxDecorationWithShadow({
  Color backgroundColor = whiteColor,
  Color? shadowColor,
  double? blurRadius,
  double? spreadRadius,
  Offset offset = const Offset(0.0, 0.0),
  LinearGradient? gradient,
  BoxBorder? border,
  List<BoxShadow>? boxShadow,
  DecorationImage? decorationImage,
  BoxShape boxShape = BoxShape.rectangle,
  BorderRadius? borderRadius,
}) {
  return BoxDecoration(
    boxShadow: boxShadow ??
        defaultBoxShadow(
          shadowColor: shadowColor,
          blurRadius: blurRadius,
          spreadRadius: spreadRadius,
          offset: offset,
        ),
    color: backgroundColor,
    gradient: gradient,
    border: border,
    image: decorationImage,
    shape: boxShape,
    borderRadius: borderRadius,
  );
}