printed function

void printed(
  1. GeneralSystemDeviceLibraryApiStatus event
)

UncompleteDocumentation

Implementation

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

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

  logger.info(event.value);
}