toMessage method

  1. @override
String toMessage()
override

Implementation

@override
String toMessage() {
  switch (code) {
    case UpdateChatAvatarErrorCode.unknownChat:
      return 'err_unknown_chat'.l10n;
    case UpdateChatAvatarErrorCode.invalidCropCoordinates:
      return 'err_invalid_crop_coordinates'.l10n;
    case UpdateChatAvatarErrorCode.invalidCropPoints:
      return 'err_invalid_crop_points'.l10n;
    case UpdateChatAvatarErrorCode.malformed:
      return 'err_uploaded_file_malformed'.l10n;
    case UpdateChatAvatarErrorCode.unsupportedFormat:
      return 'err_unsupported_format'.l10n;
    case UpdateChatAvatarErrorCode.invalidSize:
      return 'err_size_too_big'.l10n;
    case UpdateChatAvatarErrorCode.invalidDimensions:
      return 'err_dimensions_too_big'.l10n;
    case UpdateChatAvatarErrorCode.artemisUnknown:
      return 'err_unknown'.l10n;
    case UpdateChatAvatarErrorCode.dialog:
      return 'err_dialog'.l10n;
  }
}