VirtualListView.builder constructor
VirtualListView.builder({
- required IndexedWidgetBuilder? itemBuilder,
- required int itemCount,
- int? width,
- int? height,
- int itemExtent = 1,
- int? estimatedItemExtent,
- bool variableHeight = false,
- int cacheExtentItems = 0,
- String separator = '\n',
- bool handleKeys = true,
- bool mouseWheelEnabled = true,
- int mouseWheelDelta = 3,
- bool enableSelection = false,
- bool autoCopySelectionOnMouseUp = false,
- bool autoCopySelectionOnExit = false,
- bool clearSelectionAfterAutoCopy = true,
- ScrollController? controller,
- String? zoneId,
- DateTime nowProvider()?,
- Key? key,
Creates a virtualized list view that lazily builds children by index.
Implementation
VirtualListView.builder({
required this.itemBuilder,
required this.itemCount,
this.width,
this.height,
this.itemExtent = 1,
this.estimatedItemExtent,
this.variableHeight = false,
this.cacheExtentItems = 0,
this.separator = '\n',
this.handleKeys = true,
this.mouseWheelEnabled = true,
this.mouseWheelDelta = 3,
this.enableSelection = false,
this.autoCopySelectionOnMouseUp = false,
this.autoCopySelectionOnExit = false,
this.clearSelectionAfterAutoCopy = true,
this.controller,
this.zoneId,
DateTime Function()? nowProvider,
super.key,
}) : assert(itemCount >= 0),
assert(cacheExtentItems >= 0),
_children = null,
nowProvider = nowProvider ?? _defaultNowProvider;