peekDoubleValue method

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

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

Implementation

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

  return reader != null && reader.isDouble ? reader.doubleValue : null;
}