write method
Encodes value (possibly null) at byteOffset. Must write exactly
encodedSize bytes (out is zeroed when freshly allocated, but a codec
must not rely on that for the hasValue flag).
Implementation
@override
void write(ByteData out, int byteOffset, double? value) {
out.setUint8(byteOffset, value != null ? 1 : 0);
out.setFloat64(byteOffset + 1, value ?? 0.0, Endian.little);
}