mainAxisVectorIndex property

int get mainAxisVectorIndex

A helper function for returning the index in the various Vector2s like position and size to get the corresponding axis.

Implementation

int get mainAxisVectorIndex => this == Direction.horizontal ? 0 : 1;