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:

  1. Have a primary constructor or a secondary constructor named 'dog' with only positional parameters.
  2. All constructor parameters must be field references. (this.fieldName)
  3. 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();