getCurrentValue method
Returns the text or raw value associated with the current token.
For value tokens, this returns the token’s actual content, such as a string,
number, or boolean. For non-value tokens (like { or }), it may return null.
Example
if (parser.getCurrentToken() == JsonToken.VALUE_STRING) {
print('Value: ${parser.getCurrentValue()}');
}
Notes
- May return primitive types, strings, or
null - For number tokens, the type may depend on the parser implementation
Implementation
@override
String? getCurrentValue() => _currentText;