alpha method Null safety

int alpha (
  1. int color
)

Implementation

int alpha(int color) => (color == transparent) ? 0 : 255;