peekIntValue method
- @Deprecated('Use element.getXyz().getField(abc).toIntValue() instead of ConstantReader(xyzTypeChecker.firstAnnotationOf(element)).peekIntValue(abc).')
int?
peekIntValue(
- String field
)
Returns the value of the field
as an int or null
if the field is not an int.
Implementation
@Deprecated(
'Use element.getXyz().getField(abc).toIntValue() instead of ConstantReader(xyzTypeChecker.firstAnnotationOf(element)).peekIntValue(abc).',
)
int? peekIntValue(String field) {
final reader = peek(field);
return reader != null && reader.isInt ? reader.intValue : null;
}