SecureValueError.deserialize constructor

SecureValueError.deserialize(
  1. BinaryReader reader
)

Deserialize.

Implementation

factory SecureValueError.deserialize(BinaryReader reader) {
  // Read [SecureValueError] fields.
  final type = reader.readObject() as SecureValueTypeBase;
  final hash = reader.readBytes();
  final text = reader.readString();

  // Construct [SecureValueError] object.
  final returnValue = SecureValueError(
    type: type,
    hash: hash,
    text: text,
  );

  // Now return the deserialized [SecureValueError].
  return returnValue;
}