AnimatedPositioned.fromRect constructor

AnimatedPositioned.fromRect(
  1. {Key key,
  2. Widget child,
  3. Rect rect,
  4. Curve curve: Curves.linear,
  5. @required Duration duration,
  6. VoidCallback onEnd}
)

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,
  VoidCallback onEnd,
}) : left = rect.left,
     top = rect.top,
     width = rect.width,
     height = rect.height,
     right = null,
     bottom = null,
     super(key: key, curve: curve, duration: duration, onEnd: onEnd);