relativeChildPosition method

PositionUnit relativeChildPosition([
  1. Key? key
])

Converts an int value to a child-size-relative PositionUnit.

Creates a position unit that is proportional to a child element's size. For example, 1.relativeChildPosition() creates a position equal to the child's full dimension along the relevant axis.

The optional key parameter can be used to reference a specific child element when multiple children are present.

This is equivalent to PositionUnit.childSize(key) * this.position.

Implementation

PositionUnit relativeChildPosition([Key? key]) =>
    PositionUnit.childSize(key) * position;