fadeTransition method

Widget fadeTransition({
  1. required Animation<double> opacity,
  2. Key? key,
  3. bool alwaysIncludeSemantics = false,
})

Animates the opacity of a widget.

For a widget that automatically animates between the sizes of two children, fading between them, see AnimatedCrossFade.

Implementation

Widget fadeTransition({
  required Animation<double> opacity,
  Key? key,
  bool alwaysIncludeSemantics = false,
}) {
  return FadeTransition(
    key: key,
    opacity: opacity,
    alwaysIncludeSemantics: alwaysIncludeSemantics,
    child: this,
  );
}