readDoubleValue method

  1. @Deprecated('Use element.getXyz().getField(abc).toDoubleValue() instead of ConstantReader(xyzTypeChecker.firstAnnotationOf(element)).readDoubleValue(abc).')
double readDoubleValue(
  1. String field
)

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

Implementation

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

  return reader.isDouble ? reader.doubleValue : throw FormatException();
}