AnimatedSizeAndFade.showHide constructor

AnimatedSizeAndFade.showHide({
  1. Key? key,
  2. Widget? child,
  3. required bool show,
  4. TickerProvider? vsync,
  5. Duration fadeDuration = const Duration(milliseconds: 500),
  6. Duration sizeDuration = const Duration(milliseconds: 500),
  7. Curve fadeInCurve = Curves.easeInOut,
  8. Curve fadeOutCurve = Curves.easeInOut,
  9. Curve sizeCurve = Curves.easeInOut,
  10. 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.vsync,
  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);