write method
Is called when a value has to be encoded.
Implementation
@override
void write(BinaryWriter writer, Credential obj) {
writer
..writeByte(3)
..writeByte(0)
..write(obj.hdPath)
..writeByte(1)
..write(obj.w3cCredential)
..writeByte(2)
..write(obj.plaintextCredential);
}