TTableMobileCardTheme.defaultTheme constructor
TTableMobileCardTheme.defaultTheme(
- ColorScheme colors
Implementation
factory TTableMobileCardTheme.defaultTheme(ColorScheme colors) {
final baseTheme = TKeyValueTheme.defaultTheme(colors);
return TTableMobileCardTheme(
keyStyle: baseTheme.keyStyle,
labelStyle: baseTheme.labelStyle,
valueStyle: baseTheme.valueStyle,
backgroundColor: WidgetStateProperty.resolveWith(
(states) => states.contains(WidgetState.selected) ? colors.primaryContainer.withAlpha(25) : colors.surface,
),
border: WidgetStateProperty.resolveWith(
(states) => states.contains(WidgetState.selected)
? Border.all(color: colors.primary.withAlpha(50), width: 2)
: Border.all(color: colors.outline),
),
);
}