ContainerModifier constructor

const ContainerModifier({
  1. Key? key,
  2. Widget? child,
  3. Key? modifierKey,
  4. AlignmentGeometry? alignment,
  5. EdgeInsetsGeometry? padding,
  6. Color? color,
  7. Decoration? decoration,
  8. Decoration? foregroundDecoration,
  9. double? width,
  10. double? height,
  11. BoxConstraints? constraints,
  12. EdgeInsetsGeometry? margin,
  13. Matrix4? transform,
  14. AlignmentGeometry? transformAlignment,
  15. Clip clipBehavior = Clip.none,
})

Creates a widget that combines common painting, positioning, and sizing widgets.

The height and width values include the padding.

The color and decoration arguments cannot both be supplied, since it would potentially result in the decoration drawing over the background color. To supply a decoration with a color, use decoration: BoxDecoration(color: color).

Implementation

const ContainerModifier({
  super.key,
  super.child,
  super.modifierKey,
  this.alignment,
  this.padding,
  this.color,
  this.decoration,
  this.foregroundDecoration,
  this.width,
  this.height,
  this.constraints,
  this.margin,
  this.transform,
  this.transformAlignment,
  this.clipBehavior = Clip.none,
});