colorAlpha8 function

int colorAlpha8(
  1. Color color
)

返回 color 的八位透明度,范围为 0–255。

例如不透明黑色返回 255;兼容 Flutter 3.24。

Implementation

int colorAlpha8(Color color) {
  // ignore: deprecated_member_use
  return color.alpha;
}