container method
Widget
container({
- Color? color,
- DecorationImage? image,
- BoxBorder? border,
- BorderRadiusGeometry? borderRadius,
- List<
BoxShadow> ? boxShadow, - Gradient? gradient,
- BlendMode? backgroundBlendMode,
- BoxShape shape = BoxShape.rectangle,
- EdgeInsetsGeometry? padding,
- EdgeInsetsGeometry? margin,
- double? width,
- double? height,
- BoxConstraints? constraints,
- AlignmentGeometry? alignment,
Wraps this widget in a Container with the given decoration parameters.
Implementation
Widget container({
Color? color,
DecorationImage? image,
BoxBorder? border,
BorderRadiusGeometry? borderRadius,
List<BoxShadow>? boxShadow,
Gradient? gradient,
BlendMode? backgroundBlendMode,
BoxShape shape = BoxShape.rectangle,
EdgeInsetsGeometry? padding,
EdgeInsetsGeometry? margin,
double? width,
double? height,
BoxConstraints? constraints,
AlignmentGeometry? alignment,
}) {
return Container(
decoration: BoxDecoration(
color: color,
image: image,
border: border,
borderRadius: borderRadius,
boxShadow: boxShadow,
gradient: gradient,
backgroundBlendMode: backgroundBlendMode,
shape: shape,
),
padding: padding,
margin: margin,
width: width,
height: height,
constraints: constraints,
alignment: alignment,
child: this,
);
}