ListView.builder constructor
const
ListView.builder({
- Key? key,
- String? style,
- String? classAttribute,
- LayoutType layoutType = LayoutType.contain,
- Axis scrollDirection = Axis.vertical,
- int? itemCount,
- required IndexedWidgetBuilder? itemBuilder,
Creates a scrollable, linear array of widgets that are created on demand.
This constructor is appropriate for list views with a large (or infinite) number of children.
Implementation
const ListView.builder({
Key? key,
this.style,
this.classAttribute,
this.layoutType = LayoutType.contain,
this.scrollDirection = Axis.vertical,
this.itemCount,
required this.itemBuilder,
}) : isListViewBuilder = true,
children = const <Widget>[],
super(key: key);