position property Null safety
The current position of the scanner in the string, in characters.
Implementation
int get position => _position;
Implementation
set position(int position) {
if (position.isNegative || position > string.length) {
throw ArgumentError('Invalid position $position');
}
_position = position;
_lastMatch = null;
}