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.

Implementation

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