fromString static method

ServiceType fromString(
  1. String value
)

Get a ServiceType from a given string value.

Implementation

static ServiceType fromString(String value) {
  return values.firstWhere(
    (unitType) => unitType.value == value,
    orElse: () => unknown,
  );
}