RenderSliverAnimatedOpacity constructor Null safety

RenderSliverAnimatedOpacity(
  1. {required Animation<double> opacity,
  2. bool alwaysIncludeSemantics = false,
  3. RenderSliver? sliver}
)

Creates a partially transparent render object.

The opacity argument must not be null.

Implementation

RenderSliverAnimatedOpacity({
  required Animation<double> opacity,
  bool alwaysIncludeSemantics = false,
  RenderSliver? sliver,
}) : assert(opacity != null),
     assert(alwaysIncludeSemantics != null) {
  this.opacity = opacity;
  this.alwaysIncludeSemantics = alwaysIncludeSemantics;
  child = sliver;
}