read method

  1. @override
NotificationStatus? read(
  1. BinaryReader reader
)
override

Is called when a value has to be decoded.

Implementation

@override
NotificationStatus? read(BinaryReader reader) {
  switch (reader.readByte()) {
    case 0:
      return NotificationStatus.delivered;
    case 1:
      return NotificationStatus.errored;
    case 2:
      return NotificationStatus.queued;
    case 3:
      return NotificationStatus.expired;
    default:
      return null;
  }
}