AnimatedPositioned.fromRect constructor

AnimatedPositioned.fromRect({Key key, Widget child, Rect rect, Curve curve: Curves.linear, @required Duration duration })

Creates a widget that animates the rectangle it occupies implicitly.

The curve and duration arguments must not be null.


  Key key,
  Rect rect,
  Curve curve = Curves.linear,
  @required Duration duration,
}) : left = rect.left,
     top =,
     width = rect.width,
     height = rect.height,
     right = null,
     bottom = null,
     super(key: key, curve: curve, duration: duration);