read method

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

Attempts to create an instance of T with information read from the constant obj.

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

Implementation

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