decorated method
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,
盒子装饰器
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,
);
}