VirtualListView.builder constructor

VirtualListView.builder({
  1. required IndexedWidgetBuilder? itemBuilder,
  2. required int itemCount,
  3. int? width,
  4. int? height,
  5. int itemExtent = 1,
  6. int? estimatedItemExtent,
  7. bool variableHeight = false,
  8. int cacheExtentItems = 0,
  9. String separator = '\n',
  10. bool handleKeys = true,
  11. bool mouseWheelEnabled = true,
  12. int mouseWheelDelta = 3,
  13. bool enableSelection = false,
  14. bool autoCopySelectionOnMouseUp = false,
  15. bool autoCopySelectionOnExit = false,
  16. bool clearSelectionAfterAutoCopy = true,
  17. ScrollController? controller,
  18. String? zoneId,
  19. DateTime nowProvider()?,
  20. 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;