You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cloudsolutions-atoms/lib/modules/applicationDemo/enums/otp_method.dart

19 lines
382 B
Dart

/// 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,
);
}
}