downloadStatusFromInt static method

DownloadStatus downloadStatusFromInt(
  1. int? status
)

Implementation

static DownloadStatus downloadStatusFromInt(int? status) {
  if (status == 0) {
    return DownloadStatus.DOWNLOADING;
  } else if (status == 1) {
    return DownloadStatus.SUCCESS;
  } else if (status == 2) {
    return DownloadStatus.FAILED;
  } else {
    return DownloadStatus.PENDING;
  }
}