asAbsoluteItem property

Widget get asAbsoluteItem

Explicitly wraps this widget as an AbsoluteItem.

This removes the widget from the normal flex flow and allows absolute positioning within the parent container. The widget can then be positioned using top, left, bottom, and right methods.

Example:

Container()
  .asAbsoluteItem
  .positioned(top: 10.position, left: 10.position),

Implementation

Widget get asAbsoluteItem {
  return _WidgetWrapper._wrapOrCopyWith(
    child: this,
    childType: () => AbsoluteItem,
  );
}