Opacity constructor

const Opacity(
  1. {Key key,
  2. @required double opacity,
  3. bool alwaysIncludeSemantics: false,
  4. Widget child}
)

Creates a widget that makes its child partially transparent.

The opacity argument must not be null and must be between 0.0 and 1.0 (inclusive).

Implementation

const Opacity({
  Key key,
  @required this.opacity,
  this.alwaysIncludeSemantics = false,
  Widget child,
}) : assert(opacity != null && opacity >= 0.0 && opacity <= 1.0),
     assert(alwaysIncludeSemantics != null),
     super(key: key, child: child);