fromCode static method

NarrativeStatus? fromCode(
  1. String code
)

Creates a NarrativeStatus from the provided string code.

Implementation

static NarrativeStatus? fromCode(String code) {
  switch (code) {
    case 'generated':
      return NarrativeStatus.generated;
    case 'extensions':
      return NarrativeStatus.extensions;
    case 'additional':
      return NarrativeStatus.additional;
    case 'empty':
      return NarrativeStatus.empty;
    default:
      return null;
  }
}