decoration method

Container decoration({
  1. Key? key,
  2. Color? color,
  3. DecorationImage? image,
  4. BoxBorder? border,
  5. BorderRadiusGeometry? borderRadius,
  6. List<BoxShadow>? boxShadow,
  7. Gradient? gradient,
  8. BlendMode? backgroundBlendMode,
  9. BoxShape shape = .rectangle,
})

Returns a decorated widget with the given decoration.

Implementation

Container decoration({
  Key? key,
  Color? color,
  DecorationImage? image,
  BoxBorder? border,
  BorderRadiusGeometry? borderRadius,
  List<BoxShadow>? boxShadow,
  Gradient? gradient,
  BlendMode? backgroundBlendMode,
  BoxShape shape = .rectangle,
}) {
  return Container(
    key: key,
    decoration: BoxDecoration(
      backgroundBlendMode: backgroundBlendMode,
      color: color,
      borderRadius: borderRadius,
      border: border,
      boxShadow: boxShadow,
      gradient: gradient,
      image: image,
      shape: shape,
    ),
    child: this,
  );
}