AnimatedSize({Key key, Widget child, FractionalOffset alignment: FractionalOffset.center, Curve curve: Curves.linear, @required Duration duration, @required TickerProvider vsync })

Creates a widget that animates its size to match that of its child.

The curve and duration arguments must not be null.

Source

AnimatedSize({
  Key key,
  Widget child,
  this.alignment: FractionalOffset.center,
  this.curve: Curves.linear,
  @required this.duration,
  @required this.vsync,
}) : super(key: key, child: child);