TList<T, K> constructor

TList<T, K>({
  1. Key? key,
  2. TListTheme? theme,
  3. TListInteraction<T>? interaction,
  4. List<T>? items,
  5. int? itemsPerPage,
  6. String? search,
  7. int? searchDelay,
  8. TLoadListener<T>? onLoad,
  9. ItemKeyAccessor<T, K>? itemKey,
  10. TListController<T, K>? controller,
  11. ScrollController? horizontalScrollController,
  12. ScrollController? scrollController,
  13. VoidCallback? onScrollEnd,
  14. double scrollEndThreshold = 0.0,
  15. ValueNotifier<double>? scrollPositionNotifier,
  16. ValueChanged<double>? onScrollPositionChanged,
  17. bool autoItemsPerPage = true,
  18. TListCardTheme? cardTheme,
  19. ItemTextAccessor<T>? itemTitle,
  20. ItemTextAccessor<T>? itemSubTitle,
  21. ItemTextAccessor<T>? itemImageUrl,
  22. ListItemTap<T, K>? onTap,
  23. 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);