Container constructor
Container({
- AlignmentGeometry? alignment,
- EdgeInsetsGeometry? padding,
- PdfColor? color,
- BoxDecoration? decoration,
- BoxDecoration? foregroundDecoration,
- double? width,
- double? height,
- BoxConstraints? constraints,
- EdgeInsetsGeometry? margin,
- Matrix4? transform,
- Widget? child,
Implementation
Container({
this.alignment,
this.padding,
PdfColor? color,
BoxDecoration? decoration,
this.foregroundDecoration,
double? width,
double? height,
BoxConstraints? constraints,
this.margin,
this.transform,
this.child,
}) : assert(
color == null || decoration == null,
'Cannot provide both a color and a decoration\n'
'The color argument is just a shorthand for "decoration: new BoxDecoration(color: color)".'),
decoration =
decoration ?? (color != null ? BoxDecoration(color: color) : null),
constraints = (width != null || height != null)
? constraints?.tighten(width: width, height: height) ??
BoxConstraints.tightFor(width: width, height: height)
: constraints,
super();