relativeChildPosition method

PositionUnit relativeChildPosition([
  1. Key? key
])

Converts a double value to a child-size-relative PositionUnit.

Creates a position unit that is proportional to a child element's size. For example, 0.5.relativeChildPosition() creates a position that is 50% of the child's 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;