Skip to main content

Module sections

Module sections 

Source
Expand description

Section grouping for GridView.

A SectionProvider partitions the flat model into named sections; the grid renders a header above each section’s tile band and (optionally) keeps the current section’s header pinned to the top while scrolling. Sections compose with the uniform tile layout.

Structs§

GroupingSections
A SectionProvider built by partitioning consecutive equal-key runs of an (already ordered) model. The titles come from each run’s key.

Traits§

SectionProvider
Partitions a flat model into display sections.

Functions§

grouping_sections
Build a SectionProvider by grouping consecutive items of model that share a key_fn value into one section, titled by the key. The model is not sorted — callers should pre-sort if they want fully-grouped sections.