RenderAnimatedSize({@required TickerProvider vsync, @required Duration duration, Curve curve: Curves.linear, FractionalOffset alignment: FractionalOffset.center, RenderBox child })

Creates a render object that animates its size to match its child. The duration and curve arguments define the animation.

The alignment argument is used to align the child when the parent is not (yet) the same size as the child.

The duration is required.

The vsync should specify a TickerProvider for the animation controller.

The arguments duration, curve, alignment, and vsync must not be null.

Source

RenderAnimatedSize({
  @required TickerProvider vsync,
  @required Duration duration,
  Curve curve: Curves.linear,
  FractionalOffset alignment: FractionalOffset.center,
  RenderBox child,
}) : _vsync = vsync, super(child: child, alignment: alignment) {
  assert(vsync != null);
  assert(duration != null);
  assert(curve != null);
  _controller = new AnimationController(
    vsync: vsync,
    duration: duration,
  )..addListener(() {
    if (_controller.value != _lastValue)
      markNeedsLayout();
  });
  _animation = new CurvedAnimation(
    parent: _controller,
    curve: curve
  );
}