Rectangle
Rounded rectangle shape
A filled and/or stroked rectangle, with one radius or one per corner.
Methods
Rectangle(options?)WidgetNodeA rectangle shape.
- options Any
- fill Color
Fill colour.
- stroke Color
Outline colour.
- strokeWidth Number
Outline width.
- width number | Size
A number of points, or a Size.
- height number | Size
A number of points, or a Size.
- cornerRadius number | CornerRadius
A number rounds all four corners; CornerRadius.only, .horizontal or .vertical pick some.
- fill Color
Examples
Rounded card background
Rectangle({
fill: Color.blue(),
width: Size.fixed(120), height: Size.fixed(80),
cornerRadius: CornerRadius.vertical(16, 0)
})