The fraction to scale the child's alpha value.
An opacity of 1.0 is fully opaque. An opacity of 0.0 is fully transparent (i.e., invisible).
The opacity must not be null.
Values 1.0 and 0.0 are painted with a fast path. Other values require painting the child into an intermediate buffer, which is expensive.
Source
double get opacity => _opacity;
Source
set opacity (double newOpacity) { assert(newOpacity != null); assert(newOpacity >= 0.0 && newOpacity <= 1.0); if (_opacity == newOpacity) return; _opacity = newOpacity; _alpha = _getAlphaFromOpacity(_opacity); markNeedsCompositingBitsUpdate(); markNeedsPaint(); markNeedsSemanticsUpdate(); }