TableTheme class
Theme configuration for Table components.
TableTheme provides comprehensive styling options for table components including borders, background colors, corner radius, and cell theming. It integrates with the shadcn_flutter theming system to ensure consistent table styling throughout an application.
Used with ComponentTheme to apply theme values throughout the widget tree.
Example:
ComponentTheme<TableTheme>(
data: TableTheme(
border: Border.all(color: Colors.grey.shade300),
borderRadius: BorderRadius.circular(8.0),
backgroundColor: Colors.grey.shade50,
cellTheme: TableCellTheme(
padding: EdgeInsets.all(12.0),
),
),
child: MyTableWidget(),
);
Constructors
- TableTheme.new({Border? border, Color? backgroundColor, BorderRadiusGeometry? borderRadius, TableCellTheme? cellTheme})
-
Creates a TableTheme.
const
Properties
- backgroundColor → Color?
-
Background color for the table container.
final
- border → Border?
-
Border configuration for the entire table.
final
- borderRadius → BorderRadiusGeometry?
-
Border radius for the table corners.
final
- cellTheme → TableCellTheme?
-
Default theme for all table cells.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
copyWith(
{ValueGetter< Border?> ? border, ValueGetter<Color?> ? backgroundColor, ValueGetter<TableCellTheme?> ? cellTheme}) → TableTheme - Creates a copy of this theme with the given values replaced.
-
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.
override