Collection
Represents a Material UI styled collection of items arranged in a grid or list.
Overview
The Collection
provides a stylized list view in Material Design styles, including plain, inset, and inset grouped.
To use the Collection
, initialize it with your desired style and a closure that returns the content view for each element in the list.
Initializers
Creates a stylized collection with a default CollectionStyle.insetGrouped
style.
Creates a stylized collection with a custom collection style.
For detailed descriptions of the available collection styles, refer to the CollectionStyle.
Parameters
Parameter
Description
style
The style of the collection, such as .plain
, .inset
, or .insetGrouped
.
content
A closure that returns the content view for each element in the list. This parameter is used in both initializers.
Example
Displays a vertical stack of a item with a default CollectionStyle.insetGrouped
style.
Displays a vertical stack of items with a custom collection style.
Last updated