decorated method

Widget decorated({
  1. Key? key,
  2. Color? color,
  3. DecorationImage? image,
  4. BoxBorder? border,
  5. BorderRadius? borderRadius,
  6. List<BoxShadow>? boxShadow,
  7. Gradient? gradient,
  8. BlendMode? backgroundBlendMode,
  9. BoxShape shape = BoxShape.rectangle,
  10. DecorationPosition position = DecorationPosition.background,
})

盒子装饰器

Implementation

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