opacity property

Animation<double> opacity

The animation that drives this render object's opacity.

An opacity of 1.0 is fully opaque. An opacity of 0.0 is fully transparent (i.e., invisible).

To change the opacity of a child in a static manner, not animated, consider RenderOpacity instead.

This getter cannot be read until the value has been set. It should be set by the constructor of the class in which this mixin is included.

Implementation

Animation<double> get opacity => _opacity!;
void opacity=(Animation<double> value)

Implementation

set opacity(Animation<double> value) {
  if (_opacity == value) {
    return;
  }
  if (attached && _opacity != null) {
    opacity.removeListener(_updateOpacity);
  }
  _opacity = value;
  if (attached) {
    opacity.addListener(_updateOpacity);
  }
  _updateOpacity();
}