fromString static method

KeysRequieridos? fromString(
  1. String valor
)

Implementation

static KeysRequieridos? fromString(String valor) {
  try {
    return KeysRequieridos.values.firstWhere((type) => type.name == valor);
  } catch (error) {
    return null;
  }
}