CkOtpFlowManager class
Manages complete OTP lifecycle with stream-based timer
Constructors
- CkOtpFlowManager({required CkOtpConfig config, required CkAuthExtractors extractors, String? sendUrl, String? verifyUrl, String? verifyForgetUrl, RequestMethod sendMethod = RequestMethod.POST, RequestMethod verifyMethod = RequestMethod.POST, RequestMethod verifyForgotMethod = RequestMethod.POST})
Properties
- canResend → bool
-
Whether resend is currently allowed
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- lastRecipient ↔ String
-
getter/setter pair
- lastTrigger ↔ CkOtpTrigger?
-
getter/setter pair
- lastVerificationToken → String?
-
Returns the verification token for the currently active OTP trigger.
no setter
-
resendCountdown
↔ CkBehaviorStream<
int> -
Resend countdown — CkBehaviorStream so UI gets current value immediately
Emits remaining seconds. When 0, resend is allowed.
latefinal
- resetPasswordToken → String?
-
Retains the password reset token returned by the OTP verification response.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clearOtpState(
) → Future< void> - Clear all OTP state
-
dispose(
) → void -
getVerificationToken(
CkOtpTrigger trigger) → String? - Get stored verification token
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
restoreTokens(
) → Future< void> - Restore verification tokens from secure storage
-
sendOtp(
{CkOtpTrigger? trigger, String? recipient}) → Future< CkAuthResult< void> > - Send/Resend OTP via API
-
startResendTimer(
) → void - Start/restart the resend countdown timer
-
storeVerificationToken(
CkOtpTrigger trigger, String? token) → Future< void> - Store verification token from a response
-
toString(
) → String -
A string representation of this object.
inherited
-
verifyOtp(
{required String otp, Map< String, dynamic> ? additionalBody}) → Future<CkAuthResult< void> > - Verify OTP via API
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited