deserialize method
double
deserialize(
- Serializers serializers,
- Object serialized, {
- FullType specifiedType = FullType.unspecified,
override
Deserializes serialized
.
serialized
is a boolean, an integer, a double or a String.
Use serializers
as needed for nested deserialization. Information about
the type being deserialized is provided in specifiedType
.
Implementation
@override
double deserialize(
Serializers serializers,
Object serialized, {
FullType specifiedType = FullType.unspecified,
}) {
if (serialized == _nan) {
return double.nan;
} else if (serialized == _negativeInfinity) {
return double.negativeInfinity;
} else if (serialized == _infinity) {
return double.infinity;
} else {
return serialized as double;
}
}