relativeContentPosition property

PositionUnit get relativeContentPosition

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

Creates a position unit that is proportional to the total content size. For example, 0.5.relativeContentPosition creates a position that is 50% of the content's dimension along the relevant axis.

This is equivalent to PositionUnit.contentSize * this.position.

Implementation

PositionUnit get relativeContentPosition =>
    PositionUnit.contentSize * position;