AnimatedSizeAndFade.showHide constructor
AnimatedSizeAndFade.showHide({
- Key? key,
- Widget? child,
- required bool show,
- Duration fadeDuration = const Duration(milliseconds: 500),
- Duration sizeDuration = const Duration(milliseconds: 500),
- Curve fadeInCurve = Curves.easeInOut,
- Curve fadeOutCurve = Curves.easeInOut,
- Curve sizeCurve = Curves.easeInOut,
- Alignment alignment = Alignment.center,
Use this constructor when you want to show/hide the child, by doing a
vertical size/fade. To that end, instead of changing the child,
simply change show
. Note this widget will try to have its width as
big as possible, so put it in a parent with limited width constraints.
Implementation
AnimatedSizeAndFade.showHide({
Key? key,
this.child,
required this.show,
this.fadeDuration = const Duration(milliseconds: 500),
this.sizeDuration = const Duration(milliseconds: 500),
this.fadeInCurve = Curves.easeInOut,
this.fadeOutCurve = Curves.easeInOut,
this.sizeCurve = Curves.easeInOut,
this.alignment = Alignment.center,
}) : super(key: key);