getColorPressed static method

WidgetStateProperty<Color?> getColorPressed(
  1. Color color
)

Implementation

static WidgetStateProperty<Color?> getColorPressed(Color color) {
  return WidgetStateProperty.resolveWith<Color?>((states) {
    return states.contains(WidgetState.pressed)
        ? color.withAlpha(Default.alphaPressed)
        : color;
  });
}