AnimatedCrossFade({Key key, Widget firstChild, Widget secondChild, Curve firstCurve: Curves.linear, Curve secondCurve: Curves.linear, Curve sizeCurve: Curves.linear, @required CrossFadeState crossFadeState, @required Duration duration })

Creates a cross-fade animation widget.

The duration of the animation is the same for all components (fade in, fade out, and size), and you can pass Intervals instead of Curves in order to have finer control, e.g., creating an overlap between the fades.

Source

AnimatedCrossFade({
  Key key,
  this.firstChild,
  this.secondChild,
  this.firstCurve: Curves.linear,
  this.secondCurve: Curves.linear,
  this.sizeCurve: Curves.linear,
  @required this.crossFadeState,
  @required this.duration
}) : super(key: key) {
  assert(this.firstCurve != null);
  assert(this.secondCurve != null);
  assert(this.sizeCurve != null);
}