setConfig method

dynamic setConfig({
  1. dynamic appName,
  2. dynamic appEmail,
  3. dynamic userEmail,
  4. dynamic otpLength,
  5. dynamic otpType,
})

Function use to config Email OTP

Implementation

setConfig({appName, appEmail, userEmail, otpLength, otpType}) {
  _appName = appName;
  _appEmail = appEmail;
  _userEmail = userEmail;
  _otpLength = otpLength;
  switch (otpType) {
    case OTPType.digitsOnly:
      _type = "digits";
      break;
    case OTPType.stringOnly:
      _type = "string";
      break;
    case OTPType.mixed:
      _type = "mixed";
      break;
  }
}