PositionedModifier.fromRelativeRect constructor

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

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

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