relativePosition property
PositionUnit
get
relativePosition
Converts a double value to a viewport-relative PositionUnit.
Creates a position unit that is proportional to the viewport size. For example,
0.25.relativePosition creates a position that is 25% of the viewport dimension.
This is equivalent to PositionUnit.viewportSize * this.position.
Implementation
PositionUnit get relativePosition => PositionUnit.viewportSize * position;