Container constructor

Container({
  1. AlignmentGeometry? alignment,
  2. EdgeInsetsGeometry? padding,
  3. PdfColor? color,
  4. BoxDecoration? decoration,
  5. BoxDecoration? foregroundDecoration,
  6. double? width,
  7. double? height,
  8. BoxConstraints? constraints,
  9. EdgeInsetsGeometry? margin,
  10. Matrix4? transform,
  11. 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();