downloadStatusFromInt method Null safety

EMDownloadStatus downloadStatusFromInt(
  1. int? status
)

Implementation

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