RenderSliverOpacity constructor
- double opacity = 1.0,
- bool alwaysIncludeSemantics = false,
- RenderSliver? sliver,
Creates a partially transparent render object.
The opacity
argument must be between 0.0 and 1.0, inclusive.
Implementation
RenderSliverOpacity({
double opacity = 1.0,
bool alwaysIncludeSemantics = false,
RenderSliver? sliver,
}) : assert(opacity >= 0.0 && opacity <= 1.0),
_opacity = opacity,
_alwaysIncludeSemantics = alwaysIncludeSemantics,
_alpha = ui.Color.getAlphaFromOpacity(opacity) {
child = sliver;
}