Positioned.fromRelativeRect constructor

Positioned.fromRelativeRect(
  1. {Key? key,
  2. required RelativeRect rect,
  3. required Widget child}
)

Creates a Positioned object with the values from the given RelativeRect.

This sets the left, top, right, and bottom properties from the given RelativeRect. The height and width properties are set to null.

Implementation

Positioned.fromRelativeRect({
  super.key,
  required RelativeRect rect,
  required super.child,
}) : left = rect.left,
     top = rect.top,
     right = rect.right,
     bottom = rect.bottom,
     width = null,
     height = null;