serializable top-level constant
Serializable
const serializable
Marks a class or enum as serializable.
The dogs_generator will then generate a DefaultStructureConverter which
also implements Copyable
and Validatable
. The generator will also
generate an implementation of Builder
for the given type with the suffix
'Builder' appended to the original class name.
Annotated types must match following conditions:
- Have a primary constructor or a secondary constructor named 'dog' with only positional parameters.
- All constructor parameters must be field references. (this.fieldName)
- All fields specified in the eligible constructor must be serializable using a converter or must be of type String, int, double or boolean.
Implementation
const serializable = Serializable();