Size of children that are not actually visible. For example,Ī SliverChildDelegate can control the algorithm used to estimate the The ability to customize additional aspects of the child model. The ListView.custom constructor takes a SliverChildDelegate, which provides This constructor is appropriate for list views with a fixed number of children. Similarly builds separator children which appear in between the child items. ItemBuilder builds child items on demand, and separatorBuilder The parated constructor takes two IndexedWidgetBuilders: Only for those children that are actually visible. With a large (or infinite) number of children because the builder is called This constructor is appropriate for list views The ListView.builder constructor takes an IndexedWidgetBuilder, whichīuilds the children on demand. Those children that are actually visible. ThisĬonstructor is appropriate for list views with a small number ofĬhildren because constructing the List requires doing work for everyĬhild that could possibly be displayed in the list view instead of just The default constructor takes an explicit List of children. There are four options for constructing a ListView: You can't specify both itemExtent and prototypeItem, only one or none of Work, for example when the scroll position changes drastically. Machinery can make use of the foreknowledge of the children's extent to save Letting the children determine their own extent because the scrolling Specifying an itemExtent or an prototypeItem is more efficient than If non-null, the prototypeItem forces the children to have the same extentĪs the given widget in the scroll direction. If non-null, the itemExtent forces the children to have the given extent In the cross axis, theĬhildren are required to fill the ListView. It displays itsĬhildren one after another in the scroll direction. ListView is the most commonly used scrolling widget. A scrollable list of widgets arranged linearly.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |