Creates a widget that combines common painting, positioning, and sizing widgets.
The height
and width
values include the padding.
Source
Container({ Key key, this.alignment, this.padding, this.decoration, this.foregroundDecoration, double width, double height, BoxConstraints constraints, this.margin, this.transform, this.child }) : constraints = (width != null || height != null) ? constraints?.tighten(width: width, height: height) ?? new BoxConstraints.tightFor(width: width, height: height) : constraints, super(key: key) { assert(margin == null || margin.isNonNegative); assert(padding == null || padding.isNonNegative); assert(decoration == null || decoration.debugAssertIsValid()); assert(constraints == null || constraints.debugAssertIsValid()); }