FlatList<T> constructor
const
FlatList<T> ({
- Key? key,
- required List<
T> data, - required ItemBuilder<
T> buildItem, - Widget? listHeaderWidget,
- Widget? listEmptyWidget,
- Widget? listLoadingWidget,
- Widget? itemSeparatorWidget,
- bool loading = false,
- int numColumns = 1,
- double onEndReachedDelta = 200,
- VoidCallback? onEndReached,
- dynamic onScroll()?,
- RefreshCallback? onRefresh,
- Color? refreshIndicatorColor,
- double refreshIndicatorStrokeWidth = 2.0,
- double childAspectRatio = 1,
- double mainAxisSpacing = 10,
- double crossAxisSpacing = 10,
- bool horizontal = false,
- ScrollController? controller,
- bool inverted = false,
Implementation
const FlatList({
super.key,
required this.data,
required this.buildItem,
this.listHeaderWidget,
this.listFooterWidget,
this.listEmptyWidget,
this.listLoadingWidget,
this.itemSeparatorWidget,
this.loading = false,
this.numColumns = 1,
this.onEndReachedDelta = 200,
this.onEndReached,
this.onScroll,
this.onRefresh,
this.refreshIndicatorColor,
this.refreshIndicatorStrokeWidth = 2.0,
this.childAspectRatio = 1,
this.mainAxisSpacing = 10,
this.crossAxisSpacing = 10,
this.horizontal = false,
this.controller,
this.inverted = false,
});