Widgets

Rect

Rect

Rect control. Build it with the rect helper.

Example

rect(
  width: 240,
  height: 120
)

Properties

  • border_radius — Corner radius.
  • paint — Sets the paint property.
  • x — Sets the x property.
  • y — Sets the y property.

Common layout and animation properties

  • data — Arbitrary value you can attach to the control and read back in handlers.
  • height — Fixed height in logical pixels.
  • key — Stable identity used to preserve state across rebuilds.
  • width — Fixed width in logical pixels.

Reference

  • Family: shared
  • Widget type: rect
  • Helpers: rect