getAlgorithmFromName static method

Algorithm getAlgorithmFromName(
  1. String s
)

Implementation

static Algorithm getAlgorithmFromName(String s) {
  Algorithm? a;
  for (Algorithm element in Algorithm.values) {
    if (s == describeEnum(element)) {
      a = element;
    }
  }
  if (a == null) {
    throw IllegalParameterException('No enum constant Algorithm: $s');
  } else {
    return a;
  }
}