usePrototypeItem property
Whether or not to give the internal ListView a prototype item based on the first item in the tree view. Set this to true to allow the ListView to more efficiently calculate the maximum scrolling extent, and it will force the vertical size of each item to be the same size as the first item in the tree view.
If non-null, forces the children to have the same extent as the given widget in the scroll direction.
Specifying an prototypeItem
is more efficient than letting the children
determine their own extent because the scrolling machinery can make use of
the foreknowledge of the children's extent to save work, for example when
the scroll position changes drastically.
See also:
- SliverPrototypeExtentList, the sliver used internally when this property is provided. It constrains its box children to have the same extent as a prototype item along the main axis.
- The itemExtent property, which allows forcing the children's extent to a given value.
- The
itemExtentBuilder
property, which allows forcing the children's extent to be the value returned by the callback.
Defaults to false.
See also:
Implementation
final bool usePrototypeItem;