An array of items to iterate over. Each item is passed to the content function.
A function that returns a component for each item. Receives the item and its index.
A component whose children are decomposed into individual subviews for rearranging or inspection.
A function that receives each subview and returns a component.
Support
Usage
Basic iteration
Using the index
Inside a layout container
Subview decomposition
Use the subviews overload to inspect and rearrange children of an existing component:Notes
- Each call to the
contentfunction should return exactly one component. Use Group to return multiple components as one. - The
indexparameter is zero-based. - The subviews overload enables view decomposition patterns, letting you restructure existing component trees without rebuilding them.