toOpacity method

Color toOpacity(
  1. double value
)

the value is in range of 0.0 ~ 1.0

Implementation

Color toOpacity(double value) {
  return withAlpha((value * 255).toInt());
}