fromJSON static method

DocumentStatus fromJSON(
  1. String data
)

Implementation

static DocumentStatus fromJSON(String data) {
	switch (data) {
		case "draft":
			return DocumentStatus.draft;
		case "finalized":
			return DocumentStatus.finalized;
		case "pending_review":
			return DocumentStatus.pendingReview;
		case "reviewed":
			return DocumentStatus.reviewed;
		case "pending_signature":
			return DocumentStatus.pendingSignature;
		case "signed":
			return DocumentStatus.signed;
		case "canceled":
			return DocumentStatus.canceled;
		case "sent":
			return DocumentStatus.sent;
		case "delivered":
			return DocumentStatus.delivered;
		default:
			throw ArgumentError('Invalid DocumentStatus entry value $data');
		}
}