SerializersFor class

Annotation to trigger code generation of a Serializers instance.

Use like this:

@SerializersFor(const [
  MySerializableClass,
  MyOtherSerializableClass,
])
final Serializers serializers = _$serializers;

The _$serializers value will be generated for you in a part file next to the current source file. It will hold serializers for the types specified plus any types used in their fields, transitively.

Constructors

SerializersFor(List<Type> types)
const

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
types List<Type>
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited