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 be between zero and one, inclusive.

Implementation

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