opacity method

Widget opacity(
  1. double opacity, {
  2. Key? key,
  3. bool animate = false,
  4. bool alwaysIncludeSemantics = false,
})

Implementation

Widget opacity(
  double opacity, {
  Key? key,
  bool animate = false,
  bool alwaysIncludeSemantics = false,
}) =>
    animate
        ? _StyledAnimatedBuilder(
            key: key,
            builder: (animation) {
              return AnimatedOpacity(
                child: this,
                opacity: opacity,
                alwaysIncludeSemantics: alwaysIncludeSemantics,
                duration: animation.duration,
                curve: animation.curve,
              );
            })
        : Opacity(
            key: key,
            opacity: opacity,
            alwaysIncludeSemantics: alwaysIncludeSemantics,
            child: this,
          );