Viewbox
The Viewbox
is a decorator control which scales its child. It can be used to scale its child to fit the available space.
The Viewbox
gives its child infinite space in the measure phase. It will constrain either or both sides when arranging it. This depends on the value of the Stretch
.
To restrict scaling direction one can use StretchDirection
which can prevent up or down scaling.
Common Properties
Property | Type | Default | Description |
---|---|---|---|
| Uniform | Determines how child fits into the available space | |
| Both | Determines in what direction child will be scaled |
Examples
| |
| |
| |
| |
|
| |
| |
| |
|
Pseudoclasses
None
Reference
Source code
最后更新于