toMessage method

  1. @override
String toMessage()
override

Implementation

@override
String toMessage() {
  switch (code) {
    case EditChatMessageErrorCode.uneditable:
      return 'err_uneditable_message'.l10n;
    case EditChatMessageErrorCode.blocked:
      return 'err_blocked'.l10n;
    case EditChatMessageErrorCode.notAuthor:
      return 'err_not_author'.l10n;
    case EditChatMessageErrorCode.wrongAttachmentsCount:
      return 'err_wrong_attachments_items_count'.l10n;
    case EditChatMessageErrorCode.wrongReplyingChatItemsCount:
      return 'err_wrong_replying_item_count'.l10n;
    case EditChatMessageErrorCode.unknownAttachment:
      return 'err_unknown_attachment'.l10n;
    case EditChatMessageErrorCode.unknownReplyingChatItem:
      return 'err_unknown_replying_chat_item'.l10n;
    case EditChatMessageErrorCode.unknownChatItem:
      return 'err_unknown_chat_item'.l10n;
    case EditChatMessageErrorCode.noTextAndNoAttachment:
      return 'err_no_text_and_no_attachment'.l10n;
    case EditChatMessageErrorCode.artemisUnknown:
      return 'err_unknown'.l10n;
  }
}