pub fn LazyGrid(_: LazyGridProps) -> ElementExpand description
A grid that only builds the rows it can show.
The windowing protocol is LazyColumn’s, unchanged: the Renderer asks for a range of
items and this materialises exactly that range. What a grid adds is that the range
arrives rounded to whole rows, because a row is what the Renderer lays out.
How wide a column is can be said two ways, and they are different questions. columns
is a count the screen insists on. min_column_width is a width below which a column
may not fall, and the Renderer divides its own width by it: that is the same judgement
as a size class, made where the width is known, so the Host does not make it.
Saying both is saying the count, because a count leaves nothing for the width to decide.
§Props
For details, see the props struct definition.
weight:Option<f32>width:Option<f32>height:Option<f32>padding:Option<f32>padding_role:Option<SpaceRole>background:Option<Paint>shape_role:Option<ShapeRole>corner_radius:Option<f32>border_width:Option<f32>border_color:Option<Paint>elevation:Option<f32>fill_max_width:boolfill_max_height:boolcolumns:Option<u32>A fixed number of columns.
min_column_width:Option<f32>The narrowest a column may be, where the count is the Renderer’s to work out.
item_count:usizekey_of:Option<Callback<usize,String>>item:Callback<usize,Element>