SerializerGenerator class abstract

Defines methods for generating serializers and deserializers for types for example:

class DateTimeSerializerGenerator extends SerializerGenerator {
  const DateTimeSerializerGenerator();

  @override
  String serializer(String expression) => '$expression.toIso8601String()';

  @override
  String deserializer(String expression) => 'DateTime.parse($expression)';
}
Implementers

Constructors

SerializerGenerator()
Constructs a SerializerGenerator.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

generateDeserializer(String expression) String
Generates code that deserializes an expression representing a String to an instance of the type.
generateSerializer(String expression) String
Generates code that serializes an expression representing an instance of the type to a String.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited