withOpacity method

TextStyle withOpacity(
  1. double opacity
)

Creates a copy with reduced opacity.

Implementation

TextStyle withOpacity(double opacity) {
  return copyWith(
    color: color?.withValues(alpha: (color?.a ?? 1.0) * opacity),
  );
}