PositionedModifier.fromRect constructor

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

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

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

Implementation

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