position property Null safety

int position

The current position of the scanner in the string, in characters.

Implementation

int get position => _position;
void position=(int position)

Implementation

set position(int position) {
  if (position.isNegative || position > string.length) {
    throw ArgumentError('Invalid position $position');
  }

  _position = position;
  _lastMatch = null;
}