description property

String? get description

Implementation

String? get description {
  switch (this) {
    case TIMError.success:
      return LiveKitLocalizations.of(Global.appContext())?.common_client_error_success;
    case TIMError.invalidUserId:
      return LiveKitLocalizations.of(Global.appContext())?.live_invalid_userId;
    case TIMError.errSdkCommApiCallFrequencyLimit:
      return LiveKitLocalizations.of(Global.appContext())?.common_client_error_freq_limit;
    case TIMError.errSdkBlockedBySensitiveWord:
      return LiveKitLocalizations.of(Global.appContext())?.live_barrage_error_sensitive_word;
    case TIMError.errSdkNetPkgSizeLimit:
      return LiveKitLocalizations.of(Global.appContext())?.live_barrage_error_content_is_long;
    case TIMError.errSdkNetDisconnect:
    case TIMError.errSdkNetWaitAckTimeout:
    case TIMError.errSdkNetAllReadyConn:
    case TIMError.errSdkNetConnTimeout:
    case TIMError.errSdkNetConnRefuse:
    case TIMError.errSdkNetNetUnReach:
    case TIMError.errSdkNetWaitInQueueTimeout:
    case TIMError.errSdkNetWaitSendTimeout:
    case TIMError.errSdkNetWaitSendRemainingTimeout:
    case TIMError.errSdkNetWaitSendTimeoutNoNetwork:
    case TIMError.errSdkNetWaitAckTimeoutNoNetwork:
    case TIMError.errSdkNetSendRemainingTimeoutNoNetwork:
      return LiveKitLocalizations.of(Global.appContext())?.live_barrage_error_network;
    default:
      return '${LiveKitLocalizations.of(Global.appContext())?.common_client_error_failed}, code: $code';
  }
}