toRenewal method

Renewal toRenewal()

Converts this string into the corresponding Renewal value.

Implementation

Renewal toRenewal() {
  for (final Renewal renewal in Renewal.values)
    if (this == renewal.string()) return renewal;

  throw const FormatException(
      'The string does not contains a valid Renewal representation.');
}