Fader constructor

const Fader({
  1. Key? key,
  2. required Widget child,
  3. required Duration duration,
  4. required FaderController controller,
  5. Curve curve = Curves.linear,
  6. bool startVisible = true,
})

Widget child The widget that will be faded in and out

Duration duration How long the fade out animation should last

FaderController controller The controller that'll be used to fade the child widget in and out

Curve curve The curve for the animation (Optional, default is linear)

Implementation

const Fader({
  Key? key,
  required Widget child,
  required Duration duration,
  required FaderController controller,
  Curve curve = Curves.linear,
  this.startVisible = true,
})  : _child = child,
      _duration = duration,
      _controller = controller,
      _curve = curve,
      super(key: key);