Iso8601DurationSerializer class

Alternative serializer for Duration.

Install this to use ISO8601 compatible format instead of the default (microseconds). Use SerializersBuilder.add to install it.

Note that this serializer is not 100% compatible with the ISO8601 format due to limitations of the Duration class, but is designed to produce and consume reasonable strings that match the standard.

Inheritance

Constructors

Iso8601DurationSerializer()

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
types → Iterable<Type>
The Types that can be serialized.
no setteroverride
wireName → String
The wire name of the serializable type. For most classes, the class name. For primitives and collections a lower-case name is defined as part of the built_json wire format.
no setteroverride

Methods

deserialize(Serializers serializers, Object? serialized, {FullType specifiedType = FullType.unspecified}) → Duration
Deserializes serialized.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
serialize(Serializers serializers, Duration object, {FullType specifiedType = FullType.unspecified}) → Object
Serializes object.
override
toString() → String
A string representation of this object.
inherited

Operators

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