Container
Allows to decorate a control with background color and border and position it with padding, margin and alignment.Properties
Content
The content of this container.
Layout
Empty space to inscribe inside a container decoration (background, border). The child control is placed inside this padding.
Defines the alignment of the
content inside the container.Background
Defines the background color of this container.
Defines the gradient background of this container.
The blend mode applied to the
color or gradient background of the container.An image to paint above the
bgcolor or gradient. If shape=BoxShape.CIRCLE then this image is clipped to the circle’s boundary; if border_radius is not None then the image is clipped to the given radii.Border and Shape
A border to draw above the background color.
The border radius of this container.
Sets the shape of this container. Options:
RECTANGLE, CIRCLE.Defines how the
content of this container is clipped. Defaults to ClipBehavior.ANTI_ALIAS if border_radius is not None; otherwise ClipBehavior.NONE.Visual Effects
Defines how Gaussian blur effect should be applied under this container.Example:
The shadow(s) below this container.
Applies a color filter to this container.
The foreground decoration of this container.
Interaction
True to produce ink ripples effect when user clicks this container.The splash color of the ink response.
The URL to open when this container is clicked. Additionally, if an
on_click callback is provided, it is fired after that.Whether to ignore all interactions with this container and its descendants.
Animation
Enables container “implicit” animation that gradually changes its values over a period of time.
Theme
Allows setting a nested theme for all controls inside this container and down its tree.
Allows setting a nested theme to be used when in dark theme mode for all controls inside the container and down its tree.
“Resets” parent theme and creates a new, unique scheme for all controls inside the container. Otherwise the styles defined in container’s
theme property override corresponding styles from the parent, inherited theme.Events
Called when a user clicks the container. It will not be called if this container is long pressed.
Called when a user clicks the container with or without a long press.
Called when this container is long-pressed.
Called when a mouse pointer enters or exists the container area. The
data property of the event handler argument is a boolean: True when the cursor enters and False when it exits this container.