fromString static method

OperationType fromString(
  1. String stringValue
)

Creates an OperationType from a stringValue.

Implementation

static OperationType fromString(String stringValue) {
  final operationType = OperationType._registry[stringValue];

  if (operationType == null) {
    throw ValidationException(
      "Encountered unknown OperationType $stringValue.",
    );
  }

  return operationType;
}