SmartAuth class
Flutter package for listening SMS code on Android, suggesting phone number.
If you need pin code input like shown below, take a look at Pinput package, SmartAuth is already integrated into it and you can build highly customizable input, that your designers can't even draw in Figma π€
Note that only Android is supported, I faked other operating systems because other package is depended on this one and that package works on every system
Features:
Properties
- hashCode β int
-
The hash code for this object.
no setterinherited
- runtimeType β Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getAppSignature(
) β Future< SmartAuthResult< String> > - This method outputs hash that is required for SMS Retriever API https://developers.google.com/identity/sms-retriever/overview?hl=en SMS must contain this hash at the end of the text Note that hash for debug and release if different
-
getSmsWithRetrieverApi(
{String matcher = _defaultCodeMatcher}) β Future< SmartAuthResult< SmartAuthSms> > - Starts listening to SMS that contains the App signature getAppSignature in the text returns code if it matches with matcher More about SMS Retriever API https://developers.google.com/identity/sms-retriever/overview?hl=en
-
getSmsWithUserConsentApi(
{String matcher = _defaultCodeMatcher, String? senderPhoneNumber}) β Future< SmartAuthResult< SmartAuthSms> > - Starts listening to SMS User Consent API https://developers.google.com/identity/sms-retriever/user-consent/overview Which shows confirmations dialog to user to confirm reading the SMS content returns code if it matches with matcher
-
noSuchMethod(
Invocation invocation) β dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeSmsRetrieverApiListener(
) β Future< SmartAuthResult< void> > - Removes listener for getSmsWithRetrieverApi
-
removeUserConsentApiListener(
) β Future< SmartAuthResult< void> > - Removes listener for getSmsWithUserConsentApi
-
requestPhoneNumberHint(
) β Future< SmartAuthResult< String> > - Runs the Phone Number Hint API, a library powered by Google Play services provides a frictionless way to show a userβs (SIM-based) phone numbers as a hint. https://developers.google.com/identity/phone-number-hint/android
-
toString(
) β String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) β bool -
The equality operator.
inherited