read method

  1. @override
double read(
  1. DartObject dartObject
)
override

Attempts to create an instance of T with information read from the constant represented by dartObject.

Should throw ErrorOf with type argument Decoder with type argument T if an instance of T cannot be read from dartObject.

Implementation

@override
double read(DartObject dartObject) => switch (dartObject.toDoubleValue()) {
  double value => value,
  _ => throw readError(dartObject),
};