fromString static method

NewEnum fromString(
  1. String enumString
)

Implementation

static NewEnum fromString(String enumString) {
  return NewEnum.values
      .firstWhere((e) => e.toStringValue() == enumString);
}