opacity method

Widget opacity(
  1. double value, {
  2. bool alwaysIncludeSemantics = false,
})

Implementation

Widget opacity(double value, {bool alwaysIncludeSemantics = false}) {
  return Opacity(
    opacity: value.clamp(0.0, 1.0).toDouble(),
    alwaysIncludeSemantics: alwaysIncludeSemantics,
    child: this,
  );
}