AnimatedPositioned.fromRect constructor Null safety

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.

The curve and duration arguments must not be null.

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;