TTableTheme constructor
const
TTableTheme({
- TListAnimationBuilder? animationBuilder = TListAnimationBuilders.staggered,
- Duration animationDuration = const Duration(milliseconds: 800),
- bool shrinkWrap = false,
- ScrollPhysics? physics,
- EdgeInsetsGeometry? padding,
- Widget emptyStateBuilder(
- BuildContext context
- String emptyStateMessage = 'No items found',
- IconData emptyStateIcon = Icons.inbox_outlined,
- Widget errorStateBuilder(
- BuildContext context,
- TListError error
- String errorStateMessage = 'An error occurred',
- Widget loadingBuilder(
- BuildContext context
- Widget? headerWidget,
- bool? headerSticky,
- bool needsHorizontalScroll = false,
- double? horizontalScrollWidth,
- bool? infiniteScroll,
- double itemBaseHeight = 50,
- String loadingMessage = 'Loading...',
- String noMoreItemsMessage = 'No more items to display.',
- Widget separatorBuilder(
- BuildContext context,
- int index
- bool showSeparators = false,
- double itemSpacing = 0,
- double? cardWidth,
- bool? forceCardStyle,
- TTableRowHeaderTheme headerTheme = const TTableRowHeaderTheme(),
- TTableMobileCardTheme mobileCardTheme = const TTableMobileCardTheme(),
- 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(),
});