getEmailVerificationMethod static method

EmailVerificationMethod getEmailVerificationMethod(
  1. String name
)

Returns the EmailVerificationMethod corresponding to the given string name.

If no method matches the name, this returns EmailVerificationMethod.link as a default.

Implementation

static EmailVerificationMethod getEmailVerificationMethod(String name) {
  return EmailVerificationMethod.values.firstWhere(
    (e) => e.name == name,
    orElse: () => EmailVerificationMethod.link,
  );
}