showInfo method

String showInfo({
  1. String? customInfo,
})

Implementation

String showInfo({String? customInfo}) {
  if (customInfo != null) {
    return customInfo;
  }
  String str = '';
  if (bodyType == MessageType.TXT) {
    str += textContent;
  }

  if (bodyType == MessageType.IMAGE) {
    str += '[Image]';
  }

  if (bodyType == MessageType.VOICE) {
    str += "[Voice] $duration'";
  }

  if (bodyType == MessageType.LOCATION) {
    str += '[Location]';
  }

  if (bodyType == MessageType.VIDEO) {
    str += '[Video]';
  }

  if (bodyType == MessageType.FILE) {
    str += '[File]';
  }

  if (bodyType == MessageType.COMBINE) {
    str += '[Combine]';
  }

  if (bodyType == MessageType.CUSTOM && isCardMessage) {
    str += '[Card] ${cardUserNickname ?? cardUserId}';
  }
  return str;
}