cellBackgroundColor method
Color
cellBackgroundColor(
- BuildContext context, {
- Set<
MaterialState> ? materialStates, - Map<
String, dynamic> ? extraInfo,
override
Implementation
@override
Color cellBackgroundColor(BuildContext context, {Set<MaterialState>? materialStates, Map<String, dynamic>? extraInfo}) {
materialStates ??= <MaterialState>{};
if (materialStates.isPressed) {
return HexColor.fromHex('#1a1a1a');
} else if (materialStates.isHovering || materialStates.isFocused) {
return primaryColor().withAlpha(50);
} else if (materialStates.isSelected) {
return primaryColor().withAlpha(100);
} else if (materialStates.isDisabled) {
return Colors.grey[900] ?? Colors.grey;
} else {
// isNormal
return Colors.black;
}
}