/// Enum for OTP delivery methods enum OtpMethod { sms('SMS'), email('Email'); final String value; const OtpMethod(this.value); /// Get OTP method from string value static OtpMethod fromString(String value) { return OtpMethod.values.firstWhere( (method) => method.value.toLowerCase() == value.toLowerCase(), orElse: () => OtpMethod.sms, ); } }