ListView
A virtualized scrollable list that renders one item per data entry using a builder function. Maps to a UIToolkit ListView. Item elements are stateless — no full reconciliation is performed per item; the painter is called directly in makeItem and bindItem.
Constructor
ListView
Creates an ListView element.
| Parameter | Description |
|---|---|
items | The data items to display. Must not be null. |
itemBuilder | A function that produces an Element for each item. Must not be null. |
itemHeight | The fixed row height in pixels. Defaults to 32. |
selectionMode | The selection behavior. Defaults to None. |
onSelectionChanged | Optional callback invoked when the selection changes. |
key | An optional key for reconciliation identity. |
Properties
ItemBuilder
A function that maps a single data item to an Element describing its visual representation.
ItemHeight
The fixed height in pixels of each row. Defaults to 32.
Items
The ordered list of data items to display.
OnSelectionChanged
Callback invoked whenever the selection changes. Receives the currently selected items as its argument.
SelectionMode
Controls how many items can be selected at once.
Last updated on