buildDefaultTheme method
Implementation
@override
TableCellTheme buildDefaultTheme(BuildContext context) {
if (cellTheme != null) {
return cellTheme!;
}
final theme = Theme.of(context);
return TableCellTheme(
border: WidgetStateProperty.resolveWith(
(states) {
return Border(
bottom: BorderSide(
color: theme.colorScheme.border,
width: 1,
),
);
},
),
backgroundColor: WidgetStateProperty.resolveWith(
(states) {
return states.contains(WidgetState.hovered)
? theme.colorScheme.muted
: theme.colorScheme.muted.withOpacity(0.5);
},
),
textStyle: WidgetStateProperty.resolveWith(
(states) {
return theme.typography.semiBold.merge(TextStyle(
color: states.contains(WidgetState.disabled)
? theme.colorScheme.muted
: null,
));
},
),
);
}