TList<T, K> constructor
TList<T, K> ({
- Key? key,
- TListTheme? theme,
- TListInteraction<
T> ? interaction, - List<
T> ? items, - int? itemsPerPage,
- String? search,
- int? searchDelay,
- TLoadListener<
T> ? onLoad, - ItemKeyAccessor<
T, K> ? itemKey, - TListController<
T, K> ? controller, - ScrollController? horizontalScrollController,
- ScrollController? scrollController,
- VoidCallback? onScrollEnd,
- double scrollEndThreshold = 0.0,
- ValueNotifier<
double> ? scrollPositionNotifier, - ValueChanged<
double> ? onScrollPositionChanged, - bool autoItemsPerPage = true,
- TListCardTheme? cardTheme,
- ItemTextAccessor<
T> ? itemTitle, - ItemTextAccessor<
T> ? itemSubTitle, - ItemTextAccessor<
T> ? itemImageUrl, - ListItemTap<
T, K> ? onTap, - ListItemBuilder<
T, K> ? itemBuilder,
Implementation
TList({
super.key,
this.theme,
this.interaction,
// List
this.items,
this.itemsPerPage,
this.search,
this.searchDelay,
this.onLoad,
this.itemKey,
this.controller,
// Scroll
this.horizontalScrollController,
this.scrollController,
this.onScrollEnd,
this.scrollEndThreshold = 0.0,
this.scrollPositionNotifier,
this.onScrollPositionChanged,
// Auto
this.autoItemsPerPage = true,
// List card
this.cardTheme,
ItemTextAccessor<T>? itemTitle,
this.itemSubTitle,
this.itemImageUrl,
this.onTap,
ListItemBuilder<T, K>? itemBuilder,
}) : itemTitle = itemTitle ?? defaultItemTitle,
itemBuilder = itemBuilder ?? defaultItemBuilder<T, K>(cardTheme, itemTitle ?? defaultItemTitle, itemSubTitle, itemImageUrl, onTap);