read method

  1. @override
UploadJobStatus read(
  1. BinaryReader reader
)
override

Is called when a value has to be decoded.

Implementation

@override
UploadJobStatus read(BinaryReader reader) {
  switch (reader.readByte()) {
    case 0:
      return UploadJobStatus.pending;
    case 1:
      return UploadJobStatus.uploading;
    case 2:
      return UploadJobStatus.success;
    case 3:
      return UploadJobStatus.failed;
    default:
      return UploadJobStatus.pending;
  }
}