TableCellTheme constructor

const TableCellTheme({
  1. WidgetStateProperty<Border?>? border,
  2. WidgetStateProperty<Color?>? backgroundColor,
  3. WidgetStateProperty<TextStyle?>? textStyle,
})

Creates a TableCellTheme.

All parameters are optional and use WidgetStateProperty for state-aware styling.

Parameters:

  • border (WidgetStateProperty<Border?>?, optional): State-aware borders
  • backgroundColor (WidgetStateProperty<Color?>?, optional): State-aware background
  • textStyle (WidgetStateProperty<TextStyle?>?, optional): State-aware text styling

Example:

TableCellTheme(
  border: WidgetStateProperty.all(
    Border.all(color: Colors.grey.shade300),
  ),
  backgroundColor: WidgetStateProperty.resolveWith((states) {
    return states.contains(WidgetState.selected) ? Colors.blue.shade100 : null;
  }),
);

Implementation

const TableCellTheme({
  this.border,
  this.backgroundColor,
  this.textStyle,
});