fade static method

Widget fade(
  1. AnimationController controller,
  2. Widget child, {
  3. Curve curve = Curves.easeInOut,
})

A transition that fades the child in and out.

Implementation

static Widget fade(
  AnimationController controller,
  Widget child, {
  Curve curve = Curves.easeInOut,
}) {
  return FadeTransition(
    opacity: CurvedAnimation(parent: controller, curve: curve),
    child: child,
  );
}