Serializers class Null safety

Serializes all known classes.

See: https://github.com/google/built_value.dart/tree/master/example

Constructors

Serializers()
Default Serializers that can serialize primitives and collections. [...]
factory

Properties

builderFactories BuiltMap<FullType, Function>
The installed builder factories.
read-only
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
serializerPlugins Iterable<SerializerPlugin>
The installed serializer plugins.
read-only
serializers Iterable<Serializer>
The installed Serializers.
read-only

Methods

deserialize(Object? serialized, {FullType specifiedType = FullType.unspecified}) Object?
Deserializes serialized. [...]
deserializeWith<T>(Serializer<T> serializer, Object? serialized) → T?
Convenience method for when you know the type you're deserializing. Specify the type by specifying its Serializer class. Equivalent to calling deserialize with a specifiedType.
expectBuilder(FullType fullType) → void
Throws if a builder for fullType is not available via newBuilder.
fromJson<T>(Serializer<T> serializer, String serialized) → T?
Convenience method for when you have a JSON string and know the type you're deserializing. Specify the type by specifying its Serializer class. Equivalent to calling deserialize with a specifiedType then calling json.decode.
hasBuilder(FullType fullType) bool
Whether a builder for fullType is available via newBuilder.
newBuilder(FullType fullType) Object
Creates a new builder for the type represented by fullType. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
serialize(Object? object, {FullType specifiedType = FullType.unspecified}) Object?
Serializes object. [...]
serializerForType(Type type) Serializer?
Gets a serializer; returns null if none is found. For use in plugins and other extension code.
serializerForWireName(String wireName) Serializer?
Gets a serializer; returns null if none is found. For use in plugins and other extension code.
serializeWith<T>(Serializer<T> serializer, T? object) Object?
Convenience method for when you know the type you're serializing. Specify the type by specifying its Serializer class. Equivalent to calling serialize with a specifiedType.
toBuilder() SerializersBuilder
toJson<T>(Serializer<T> serializer, T? object) String
Convenience method for when you want a JSON string and know the type you're serializing. Specify the type by specifying its Serializer class. Equivalent to calling serialize with a specifiedType then calling json.encode.
toString() String
A string representation of this object. [...]
inherited

Operators

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

Static Methods

merge(Iterable<Serializers> serializersIterable) Serializers
Merges iterable of Serializers into a single Serializers. [...]