inBounds property

bool get inBounds

Whether or not position is between 0 and length.

Implementation

bool get inBounds => position >= 0 && position < length;