getTypeMessage function

ChatMessageType getTypeMessage(
  1. int value
)

Implementation

ChatMessageType getTypeMessage(int value) {
  switch (value) {
    case 0:
      return ChatMessageType.text;
    case 1:
      return ChatMessageType.audio;
    case 2:
      return ChatMessageType.image;
    case 3:
      return ChatMessageType.sticker;
    case 4:
      return ChatMessageType.gallery;
    case 5:
      return ChatMessageType.video;
    case 6:
      return ChatMessageType.system;
    case 7:
      return ChatMessageType.deleted;
    case 8:
      return ChatMessageType.invited;
    default:
      return ChatMessageType.text;
  }
}