OtpService class

A singleton OTP listener service using Android's SMS Retriever API.

Call init once during app startup or on-demand. Access the stream via otpStream.

Constructors

OtpService()
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
otpStream Stream<String>
Access the OTP stream for listening to incoming codes.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → void
Call this during app shutdown or widget dispose if needed.
getAndroidAppSignature() Future<String?>
Optionally fetch the Android app signature for the SMS Retriever hash.
init() Future<void>
Call this once to initialize the plugin and start listening to OTPs.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited