withTransparency static method

Color? withTransparency(
  1. Color? color, {
  2. double? opacity,
  3. int? alpha,
})

Returns a new color that matches this color with the alpha channel replaced with the given opacity (which ranges from 0.0 to 1.0), and/or with the alpha channel replaced with a (which ranges from 0 to 255).

Implementation

static Color? withTransparency(
  Color? color, {
  double? opacity,
  int? alpha,
}) {
  color = WxColors.withOpacity(color, opacity);
  color = WxColors.withAlpha(color, alpha);
  return color;
}