AnimatedPositioned.fromRect constructor

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

Creates a widget that animates the rectangle it occupies implicitly.

Implementation

AnimatedPositioned.fromRect({
  super.key,
  required this.child,
  required Rect rect,
  super.curve,
  required super.duration,
  super.onEnd,
}) : left = rect.left,
     top = rect.top,
     width = rect.width,
     height = rect.height,
     right = null,
     bottom = null;