⌂
›
Reference
›
ListView
ListView
A scrollable list of controls, optimized for many items. Prefer it over a scrolling column when the list is long.
Example
list_view(
expand: true,
spacing: 4,
padding: 8,
children: messages.map { |m| list_tile(title: text(m.subject), subtitle: text(m.preview)) }
)
Common properties
children— the list itemshorizontal— scroll horizontally instead of verticallyspacingpaddingitem_extent— fixed item size for faster layoutdivider_thickness— draw dividers between itemsauto_scroll— keep the latest item in view (chat/logs)reversecache_extent
Usage
list_view expands to fill its parent — give it expand: true inside a column, or a fixed height. For huge or streamed lists, set build_controls_on_demand: true.