FirebasePhoneAuthHandler class
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- FirebasePhoneAuthHandler
Constructors
- FirebasePhoneAuthHandler({Key? key, required String phoneNumber, required Widget builder(BuildContext, FirebasePhoneAuthController), OnLoginSuccess? onLoginSuccess, OnLoginFailed? onLoginFailed, OnError? onError, VoidCallback? onCodeSent, bool signOutOnSuccessfulVerification = false, bool sendOtpOnInitialize = true, bool linkWithExistingUser = false, Duration autoRetrievalTimeOutDuration = FirebasePhoneAuthController.kAutoRetrievalTimeOutDuration, Duration otpExpirationDuration = FirebasePhoneAuthController.kAutoRetrievalTimeOutDuration, RecaptchaVerifier? recaptchaVerifierForWebProvider(bool)?})
-
const
Properties
- autoRetrievalTimeOutDuration → Duration
-
The maximum amount of time you are willing to wait for SMS
auto-retrieval to be completed by the library.
final
- builder → Widget Function(BuildContext, FirebasePhoneAuthController)
-
The widget returned by the
builder
is rendered on to the screen and builder is called every time a value changes i.e. either the timerCount or any other value.final - hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- linkWithExistingUser → bool
-
If true, links the generated credentials to an existing signed in user,
and not creating new session.
final
- onCodeSent → VoidCallback?
-
Callback called when the code is sent successfully to the phone number
final
- onError → OnError?
-
Called when a general error occurs.
final
- onLoginFailed → OnLoginFailed?
-
This callback is triggered if the phone verification fails. The callback provides
FirebaseAuthException which contains information about the error.
final
- onLoginSuccess → OnLoginSuccess?
-
This callback is triggered when the phone number is verified and the user is
signed in successfully. The function provides UserCredential which contains
essential user information.
final
- otpExpirationDuration → Duration
-
The OTP expiration duration, can be used to display a timer, and show
a resend button, to resend the OTP.
final
- phoneNumber → String
-
The phone number to which the OTP is to be sent.
final
- recaptchaVerifierForWebProvider → RecaptchaVerifier? Function(bool)?
-
Custom reCAPTCHA for web-based authentication.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sendOtpOnInitialize → bool
-
Whether to send OTP as soon as the widget initializes or not
final
- signOutOnSuccessfulVerification → bool
-
If true, the user is signed out before the onLoginSuccess
callback is fired when the OTP is verified successfully.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → _FirebasePhoneAuthHandlerState -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
signOut(
BuildContext context) → Future< void> - Signs out the current user.