readIntValue method

  1. @Deprecated('Use element.getXyz().getField(abc).toIntValue() instead of ConstantReader(xyzTypeChecker.firstAnnotationOf(element)).readIntValue(abc).')
int readIntValue(
  1. String field
)

Returns the value of the field as an int or throws a FormatException if the field is not an int.

Implementation

@Deprecated(
  'Use element.getXyz().getField(abc).toIntValue() instead of ConstantReader(xyzTypeChecker.firstAnnotationOf(element)).readIntValue(abc).',
)
int readIntValue(String field) {
  final reader = read(field);

  return reader.isInt ? reader.intValue : throw FormatException();
}