RenderAnimatedOpacity constructor Null safety

RenderAnimatedOpacity(
  1. {required Animation<double> opacity,
  2. bool alwaysIncludeSemantics = false,
  3. RenderBox? child}
)

Creates a partially transparent render object.

The opacity argument must not be null.

Implementation

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