SliverPositioned.fromRelativeRect constructor

SliverPositioned.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

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