intToFrappeDocStatus static method

FrappeDocStatus? intToFrappeDocStatus(
  1. int? docStatus
)

Converts the docStatus of a document from 0, 1 or 2 to FrappeDocStatus

Implementation

static FrappeDocStatus? intToFrappeDocStatus(int? docStatus) {
  if (docStatus == null) {
    return null;
  }
  if (!<int>[0, 1, 2].contains(docStatus)) {
    throw NotDocStatusIntegerError();
  }
  return FrappeDocStatus.values[docStatus];
}