left method

Widget left(
  1. PositionUnit left, [
  2. Key? key
])

Sets the distance from the left edge of the parent container.

This positions the widget at a specific offset from the left edge using a PositionUnit. Can be used with absolute or relative positioning.

The optional key parameter assigns a key to the wrapped widget.

Example:

Text('Left aligned').left(20.position),
Text('Quarter from left').left(0.25.relativePosition),

Implementation

Widget left(PositionUnit left, [Key? key]) {
  return _WidgetWrapper._wrapOrCopyWith(
    child: this,
    key: key != null ? () => key : null,
    left: () => left,
  );
}