channelEventValueOf function Null safety

ChannelEventCategory channelEventValueOf(
  1. int value
)

Implementation

ChannelEventCategory channelEventValueOf(int value) {
  switch (value) {
    case 0:
      return ChannelEventCategory.none;
    case 10000:
      return ChannelEventCategory.join;
    case 10001:
      return ChannelEventCategory.leave;
    case 10002:
      return ChannelEventCategory.updateOperators;
    case 10020:
      return ChannelEventCategory.invite;
    case 10022:
      return ChannelEventCategory.declineInvite;
    case 10102:
      return ChannelEventCategory.enter;
    case 10103:
      return ChannelEventCategory.exit;
    case 10201:
      return ChannelEventCategory.mute;
    case 10200:
      return ChannelEventCategory.unmute;
    case 10601:
      return ChannelEventCategory.ban;
    case 10600:
      return ChannelEventCategory.unban;
    case 10701:
      return ChannelEventCategory.frozen;
    case 10700:
      return ChannelEventCategory.unfrozen;
    case 10900:
      return ChannelEventCategory.typingStart;
    case 10901:
      return ChannelEventCategory.typingEnd;
    case 11000:
      return ChannelEventCategory.propChanged;
    case 12000:
      return ChannelEventCategory.deleted;
    case 11100:
      return ChannelEventCategory.metaDataChanged;
    case 11200:
      return ChannelEventCategory.metaCounterChanged;
    case 13000:
      return ChannelEventCategory.hidden;
    case 13001:
      return ChannelEventCategory.unhidden;
    default:
      return ChannelEventCategory.none;
  }
}