Constraints & Intrinsic Measurements
Negotiate size between parent and child.
Constraints Are a Size Contract
A parent passes constraints to each child: the allowed min and max width and height. The child must choose a size that fits inside them. 📏
Four Numbers Define the Box
Every Constraints object holds minWidth, maxWidth, minHeight, and maxHeight. Together they describe the range of sizes a child may pick.
constraints.minWidth
constraints.maxWidth
constraints.maxHeightAll lessons in this course
- The Measure & Place Model
- Writing a Layout Composable
- Constraints & Intrinsic Measurements
- A FlowRow That Wraps Chips