serializable library

Classes

Annotation
Class used to make annotations listed on ClassMirror
ClassMirror
reflects a Dart language class.
DeclarationMirror
reflects attributes declared in a Dart program.
FunctionMirror
reflects functions declared in a Dart program.
Mirror
Base class for mirrors
Reflectable
Annotation needed to generate ClassMirror for every class
Serializable
annotation used to determine which files will be processed by the generator
SerializableMap
Interface that should be implemented by all the generated serializable classes
SerializedName
Annotation class to describe properties of a class member.

Constants

reflectable → const Reflectable
Annotation needed to generate ClassMirror for every class
serializable → const Serializable
Shorthand annotation of Serializable used to determine which classes will be processed by the generator

Properties

classMirrors Map<Type, ClassMirror?>
returns the map of Type-ClassMirror
no setter
functionMirrors Map<Function, FunctionMirror>
returns the map of Function-FunctionMirror combination
no setter
getClassMirrorFromGenericInstance GetClassMirrorFromGenericInstance
getter/setter pair

Functions

fromSerialized(dynamic serialized, dynamic factory) → dynamic
Converts the serialized value into its respective complex object value depending on the result of the factory function.
fromSerializedDateTime(dynamic serialized) → dynamic
Converts the serialized integer or ISO formatted String into a Datetime value
fromSerializedEnum(int? serialized, Type type, Function factory) → dynamic
Converts the serialized integer value into an enum in dependence of the factory result
initClassMirrors(Map<Type, ClassMirror> classMirrors) → void
adds to a map containing a Map with Type as keys and ClassMirrors as values
initFunctionMirrors(Map<Function, FunctionMirror> classMirrors) → void
adds to a map containing a Map<Function, FunctionMirror> as values
reflect(dynamic instance) ClassMirror?
Returns the ClassMirror corresponding to the runtime type of the instance
reflectFunction(Function function) FunctionMirror?
Returns the FunctionMirror corresponding to the function
reflectType(Type type) ClassMirror?
Returns the ClassMirror corresponding to the type
throwFieldNotFoundException(Object? key, String type) → dynamic

Typedefs

FunctionCall = dynamic Function([List? positionalParams, Map<String, dynamic>? namedParams])
GetClassMirrorFromGenericInstance = ClassMirror? Function(dynamic instance)

Exceptions / Errors

FieldNotFoundException