SmsUserConsent class
SmsUserConsent implements Android's SMS User Consent API.
This plugin can be used to retrieve user's phone number and request user consent to read a single SMS verification message.
Constructors
- SmsUserConsent({Function? phoneNumberListener, Function? smsListener})
- SmsUserConsent plugin works only on Android, hence make sure to check the platform is Android.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- receivedSms → String?
-
Last received sms
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectedPhoneNumber → String?
-
Last selected phone number
no setter
Methods
-
dispose(
) → void - Clears last phone number, sms and their respective listeners.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
requestPhoneNumber(
) → void - Optional (not required for receiving sms): Get user's phone number.
-
requestSms(
{String? senderPhoneNumber}) → void - Start listening for an incoming message for the next five minutes.
-
toString(
) → String -
A string representation of this object.
inherited
-
updatePhoneNumberListener(
Function listener) → void - Updates Phone number listener
-
updateSmsListener(
Function listener) → void - Updates Sms listener
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited