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. void onEnd()?,
})

Creates a widget that animates the rectangle it occupies implicitly.

Implementation

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