SliverAnimatedOpacity constructor

const SliverAnimatedOpacity(
  1. {Key key,
  2. Widget sliver,
  3. @required double opacity,
  4. Curve curve: Curves.linear,
  5. @required Duration duration,
  6. VoidCallback onEnd,
  7. bool alwaysIncludeSemantics: false}
)

Creates a widget that animates its opacity implicitly.

The opacity argument must not be null and must be between 0.0 and 1.0, inclusive. The curve and duration arguments must not be null.

Implementation

const SliverAnimatedOpacity({
  Key key,
  this.sliver,
  @required this.opacity,
  Curve curve = Curves.linear,
  @required Duration duration,
  VoidCallback onEnd,
  this.alwaysIncludeSemantics = false,
}) : assert(opacity != null && opacity >= 0.0 && opacity <= 1.0),
    super(key: key, curve: curve, duration: duration, onEnd: onEnd);