printed function

void printed(
  1. GeneralLibraryApiStatus event
)

Implementation

void printed(GeneralLibraryApiStatus event) {
  if (event.serverUniverseApiStatusType ==
      GeneralLibraryApiStatusType.progress_start) {
    progress.cancel();
    progress = logger.progress(event.value);
    return;
  }
  if (event.serverUniverseApiStatusType ==
      GeneralLibraryApiStatusType.progress) {
    progress.update(event.value);
    return;
  }
  if (event.serverUniverseApiStatusType ==
      GeneralLibraryApiStatusType.progress_complete) {
    progress.complete(event.value);

    // progress.cancel();
    return;
  }
  if (event.serverUniverseApiStatusType == GeneralLibraryApiStatusType.succes) {
    logger.success(event.value);
    return;
  }
  if (event.serverUniverseApiStatusType == GeneralLibraryApiStatusType.failed) {
    logger.err(event.value);
    return;
  }

  logger.info(event.value);
}