getByInt static method

MessageStatusEnum getByInt(
  1. int index
)

根据Int类型值获得枚举 index Int常量 Return 枚举对象

Implementation

static MessageStatusEnum getByInt(int index) {
  switch (index) {
    case 0:
      return MessageStatusEnum.Unknown;
    case 1:
      return MessageStatusEnum.Sending;
    case 2:
      return MessageStatusEnum.SendSucc;
    case 3:
      return MessageStatusEnum.SendFail;
    case 4:
      return MessageStatusEnum.HasDeleted;
    case 6:
      return MessageStatusEnum.HasRevoked;
  }
  throw ArgumentError("参数异常");
}