SerializableField class

Attaches options to a field.

Implementers

Constructors

SerializableField({String? alias, dynamic defaultValue, Symbol? serializer, Symbol? deserializer, String? errorMessage, bool isNullable = true, bool exclude = false, bool canDeserialize = false, bool canSerialize = false, Type? serializesTo})
const

Properties

alias String?
An alternative name for this field.
final
canDeserialize bool
Whether this field can be serialized, if exclude is true. Defaults to false.
final
canSerialize bool
Whether this field can be serialized, if exclude is true. Defaults to false.
final
defaultValue → dynamic
A default for this field.
final
deserializer Symbol?
A custom serializer for this field.
final
errorMessage String?
An error message to be printed when the provided value is invalid.
final
exclude bool
Whether to exclude this field from serialization. Defaults to false.
final
hashCode int
The hash code for this object.
no setterinherited
isNullable bool
Whether this field can be set to null.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
serializer Symbol?
A custom serializer for this field.
final
serializesTo Type?
May be used with serializer and deserializer.
final

Methods

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