AnimatedCrossFade constructor
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.
All the arguments other than key
must be non-null.
Implementation
const AnimatedCrossFade({
Key key,
@required this.firstChild,
@required this.secondChild,
this.firstCurve = Curves.linear,
this.secondCurve = Curves.linear,
this.sizeCurve = Curves.linear,
this.alignment = Alignment.topCenter,
@required this.crossFadeState,
@required this.duration,
this.layoutBuilder = defaultLayoutBuilder,
}) : assert(firstChild != null),
assert(secondChild != null),
assert(firstCurve != null),
assert(secondCurve != null),
assert(sizeCurve != null),
assert(alignment != null),
assert(crossFadeState != null),
assert(duration != null),
assert(layoutBuilder != null),
super(key: key);