getColor function

Color getColor(
  1. Set<MaterialState> states
)

Material state widgets color function for the DarkBlue theme

Implementation

Color getColor(Set<MaterialState> states) {
  const Set<MaterialState> interactiveStates = <MaterialState>{
    MaterialState.pressed,
    MaterialState.hovered,
    MaterialState.focused,
  };
  if (states.any(interactiveStates.contains)) {
    return Colors.red[900]!;
  }
  return Colors.red[900]!.withAlpha(40);
}