relativePosition property
PositionUnit
get
relativePosition
Converts an int value to a viewport-relative PositionUnit.
Creates a position unit that is proportional to the viewport size. For example,
1.relativePosition creates a position equal to the full viewport dimension.
This is equivalent to PositionUnit.viewportSize * this.position.
Implementation
PositionUnit get relativePosition => PositionUnit.viewportSize * position;