主题
BoxConstraints
Box 的大小必须满足的约束条件。
当且仅当满足以下全部关系时,一个 Size 才符合 BoxConstraints 的约束:
min_width <= Size.width <= max_width min_height <= Size.height <= max_height
有关 BoxConstraints 的更多说明,请见 此处。
属性
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
min_width | Number | 0 | The minimum width that satisfies the constraints, such that 0.0 <= min_width <= max_width. |
min_height | Number | 0 | The minimum height that satisfies the constraints, such that 0.0 <= min_height <= max_height. |
max_width | Number | float('inf' | The maximum width that satisfies the constraints, such that min_width <= max_width <= float("inf"). |
max_height | Number | float('inf' | The maximum height that satisfies the constraints, such that min_height <= max_height <= float("inf"). |
方法
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
copy | 'BoxConstraints' | — | 返回此对象的副本,可覆盖指定属性。 |