withShadow method

  1. @deprecated
Container withShadow({
  1. Color bgColor = whiteColor,
  2. Color shadowColor = Colors.black12,
  3. dynamic blurRadius = 10.0,
  4. dynamic spreadRadius = 0.0,
  5. Offset offset = const Offset(0.0, 0.0),
  6. LinearGradient? gradient,
  7. BoxBorder? border,
  8. DecorationImage? decorationImage,
  9. BoxShape boxShape = BoxShape.rectangle,
})

Implementation

@deprecated
Container withShadow({
  Color bgColor = whiteColor,
  Color shadowColor = Colors.black12,
  blurRadius = 10.0,
  spreadRadius = 0.0,
  Offset offset = const Offset(0.0, 0.0),
  LinearGradient? gradient,
  BoxBorder? border,
  DecorationImage? decorationImage,
  BoxShape boxShape = BoxShape.rectangle,
}) {
  return Container(
    decoration: boxDecorationWithShadow(
      boxShadow: [
        BoxShadow(
          color: shadowColor,
          blurRadius: blurRadius,
          spreadRadius: spreadRadius,
          offset: offset,
        ),
      ],
      backgroundColor: bgColor,
      gradient: gradient,
      border: border,
      decorationImage: decorationImage,
      boxShape: boxShape,
    ),
    child: this,
  );
}