TTableTheme class

Theme configuration for TTable.

TTableTheme extends TListTheme and aggregates sub-themes for:

It also defines layout properties like column width calculation logic and breakpoints for switching between card/table views.

Inheritance

Constructors

TTableTheme({TListAnimationBuilder? animationBuilder = TListAnimationBuilders.staggered, Duration animationDuration = const Duration(milliseconds: 800), bool shrinkWrap = false, ScrollPhysics? physics, EdgeInsets? padding, required TListEmptyBuilder? emptyStateBuilder, required TListErrorBuilder? errorStateBuilder, TListLoadingBuilder? loadingBuilder, TListHeaderBuilder? headerBuilder, bool? headerSticky, TListFooterBuilder? footerBuilder, bool? footerSticky, bool? infiniteScroll, double? itemBaseHeight, required TListFooterBuilder infiniteScrollFooterBuilder, TListSeparatorBuilder? listSeparatorBuilder, TListDragProxyDecorator? dragProxyDecorator, TGridMode? grid, TGridDelegateBuilder? gridDelegate, double? cardWidth, bool? forceCardStyle, TTableRowHeaderTheme headerTheme = const TTableRowHeaderTheme(), TTableMobileCardTheme mobileCardTheme = const TTableMobileCardTheme(), TTableRowCardTheme rowCardTheme = const TTableRowCardTheme()})
Creates a table theme.
const
TTableTheme.defaultTheme(ColorScheme colors)
Creates a default theme derived from the context colors.
factory

Properties

animationBuilder TListAnimationBuilder?
finalinherited
animationDuration Duration
finalinherited
cardWidth double?
final
dragProxyDecorator TListDragProxyDecorator?
finalinherited
emptyStateBuilder TListEmptyBuilder?
finalinherited
errorStateBuilder TListErrorBuilder?
finalinherited
footerBuilder TListFooterBuilder?
finalinherited
footerSticky bool?
finalinherited
forceCardStyle bool?
final
grid TGridMode?
finalinherited
gridDelegate TGridDelegateBuilder?
finalinherited
hashCode int
The hash code for this object.
no setterinherited
headerBuilder TListHeaderBuilder?
finalinherited
headerSticky bool?
finalinherited
headerTheme TTableRowHeaderTheme
final
infiniteScroll bool?
finalinherited
infiniteScrollFooterBuilder TListFooterBuilder
finalinherited
itemBaseHeight double
finalinherited
listSeparatorBuilder TListSeparatorBuilder?
finalinherited
loadingBuilder TListLoadingBuilder?
finalinherited
mobileCardTheme TTableMobileCardTheme
final
padding EdgeInsets?
finalinherited
physics ScrollPhysics?
finalinherited
rowCardTheme TTableRowCardTheme
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shrinkWrap bool
finalinherited

Methods

buildDefaultExpandedContent<T>(ColorScheme colors, T item, int index) Widget
Builds a default simplified expanded content widget.
copyWith({TListAnimationBuilder? animationBuilder, Duration? animationDuration, bool? shrinkWrap, ScrollPhysics? physics, EdgeInsets? padding, TListEmptyBuilder? emptyStateBuilder, TListErrorBuilder? errorStateBuilder, TListLoadingBuilder? loadingBuilder, TListHeaderBuilder? headerBuilder, TListFooterBuilder? footerBuilder, bool? headerSticky, bool? footerSticky, bool? infiniteScroll, double? itemBaseHeight, TListFooterBuilder? infiniteScrollFooterBuilder, TListSeparatorBuilder? listSeparatorBuilder, TListDragProxyDecorator? dragProxyDecorator, TGridMode? grid, TGridDelegateBuilder? gridDelegate, double? cardWidth, bool? forceCardStyle, TTableRowHeaderTheme? headerTheme, TTableMobileCardTheme? mobileCardTheme, TTableRowCardTheme? rowCardTheme}) TTableTheme
Creates a copy of the theme with updated properties.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

calculateColumnWidths<T, K>(List<TTableHeader<T, K>> headers, bool selectable, bool expandable) Map<int, TableColumnWidth>
Calculates column widths based on headers and available options.
calculateTotalRequiredWidth<T, K>(List<TTableHeader<T, K>> headers, bool selectable, bool expandable) double
Calculates the minimum total width required for the table view.