cellBackgroundColor method

  1. @override
Color cellBackgroundColor(
  1. BuildContext context, {
  2. Set<MaterialState>? materialStates,
  3. 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('#3a3a3c');
  } 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 HexColor.fromHex('#1c1c1e');
  }
}