Container

The Container is a fundamental building block for creating layouts. It can hold a single child widget and allows you to apply rich styling and positioning, including padding, margins, borders, and background colors or gradients.

Layout Properties

Property
Description

Child Alignment

Aligns the child widget within the container (e.g., topLeft, center).

Width

The fixed width of the container.

Height

The fixed height of the container.

Padding

The space between the container's border and its child widget.

Margin

The space around the container, separating it from other widgets.

Constraints Properties

Property
Description

Min Width

The minimum width the container can shrink to.

Min Height

The minimum height the container can shrink to.

Max Width

The maximum width the container can expand to.

Max Height

The maximum height the container can expand to.

Appearance Properties

Property
Description

Color

The solid background color of the container.

Gradient

A color gradient to apply to the background. This will override the Color property.

Box Shape

The shape of the container, such as rectangle or circle.

Elevation

The z-axis elevation, which is used to create a shadow effect.

Border Radius

The radius for the corners if the shape is a rounded rectangle.

Border

The border around the container including width, color, and style.

Shadow Properties

Property
Description

Shadow

A list of shadow effects to apply to the container, allowing for complex shadow designs.

Default Properties

The Container widget supports Default Properties - Interactions only.

Last updated