alpha property

int? alpha

The amount to multiply into the alpha channel.

The opacity is expressed as an integer from 0 to 255, where 0 is fully transparent and 255 is fully opaque.

The scene must be explicitly recomposited after this property is changed (as described at Layer).

Implementation

int? get alpha => _alpha;
void alpha=(int? value)

Implementation

set alpha(int? value) {
  assert(value != null);
  if (value != _alpha) {
    if (value == 255 || _alpha == 255) {
      engineLayer = null;
    }
    _alpha = value;
    markNeedsAddToScene();
  }
}