generic_reader library Null safety

Library providing a customizable generic reader aimed at creating runtime constant objects from a static representation of a compile-time constant expression such as ConstantReader or DartObject.

Classes

InvalidTypeArgument
This type of error is thrown if an invalid type argument is provided for a generic type.
UnknownType
A sealed type that is not and cannot be registered with GenericReader.

Extensions

GenericReader
Adds the following methods to ConstantReader: get<T>(), getList<T>(), getSet<T>(), getMap<K, V>(), enumValue<T>(), holdsA<T>().
TypeMethods
Extension adding the type methods to ConstantReader.

Typedefs

Decoder<T> = T Function(ConstantReader constantReader)
Typedef of a function with return type T and an input argument of type ConstantReader.