positionTween method

RelativeRectTween positionTween(
  1. BoxConstraints constraints
)

Returns a RelativeRectTween that is used to animate from the origin of renderBox to the size of the screen.

Implementation

RelativeRectTween positionTween(BoxConstraints constraints) {
  final origin = renderBoxOffset! & renderBoxSize!;
  return RelativeRectTween(
    begin: RelativeRect.fromLTRB(
        origin.left,
        origin.top,
        constraints.biggest.width - origin.right,
        constraints.biggest.height - origin.bottom),
    end: RelativeRect.fill,
  );
}