TTableTheme constructor

const TTableTheme({
  1. TListAnimationBuilder? animationBuilder = TListAnimationBuilders.staggered,
  2. Duration animationDuration = const Duration(milliseconds: 800),
  3. bool shrinkWrap = false,
  4. ScrollPhysics? physics,
  5. EdgeInsetsGeometry? padding,
  6. Widget emptyStateBuilder(
    1. BuildContext context
    )?,
  7. String emptyStateMessage = 'No items found',
  8. IconData emptyStateIcon = Icons.inbox_outlined,
  9. Widget errorStateBuilder(
    1. BuildContext context,
    2. TListError error
    )?,
  10. String errorStateMessage = 'An error occurred',
  11. Widget loadingBuilder(
    1. BuildContext context
    )?,
  12. Widget? headerWidget,
  13. bool? headerSticky,
  14. Widget? footerWidget,
  15. bool? footerSticky,
  16. bool needsHorizontalScroll = false,
  17. double? horizontalScrollWidth,
  18. bool? infiniteScroll,
  19. double itemBaseHeight = 50,
  20. String loadingMessage = 'Loading...',
  21. String noMoreItemsMessage = 'No more items to display.',
  22. Widget separatorBuilder(
    1. BuildContext context,
    2. int index
    )?,
  23. bool showSeparators = false,
  24. double itemSpacing = 0,
  25. double? cardWidth,
  26. bool? forceCardStyle,
  27. TTableRowHeaderTheme headerTheme = const TTableRowHeaderTheme(),
  28. TTableMobileCardTheme mobileCardTheme = const TTableMobileCardTheme(),
  29. TTableRowCardTheme rowCardTheme = const TTableRowCardTheme(),
})

Implementation

const TTableTheme({
  super.animationBuilder = TListAnimationBuilders.staggered,
  super.animationDuration = const Duration(milliseconds: 800),
  super.shrinkWrap = false,
  super.physics,
  super.padding,
  // Empty state
  super.emptyStateBuilder,
  super.emptyStateMessage = 'No items found',
  super.emptyStateIcon = Icons.inbox_outlined,
  // Error state
  super.errorStateBuilder,
  super.errorStateMessage = 'An error occurred',
  // Loading state
  super.loadingBuilder,
  // Header
  super.headerWidget,
  super.headerSticky,
  // Footer
  super.footerWidget,
  super.footerSticky,
  // Horizontal scroll
  super.needsHorizontalScroll = false,
  super.horizontalScrollWidth,
  // Infinite scroll
  super.infiniteScroll,
  super.itemBaseHeight = 50,
  super.loadingMessage = 'Loading...',
  super.noMoreItemsMessage = 'No more items to display.',
  // Separators
  super.separatorBuilder,
  super.showSeparators = false,
  // Spacing
  super.itemSpacing = 0,
  // Table
  this.cardWidth,
  this.forceCardStyle,
  this.headerTheme = const TTableRowHeaderTheme(),
  this.mobileCardTheme = const TTableMobileCardTheme(),
  this.rowCardTheme = const TTableRowCardTheme(),
});