@@ -18,15 +18,18 @@ class FirebasePhoneAuthHandler extends StatefulWidget {
1818 }) : super (key: key);
1919
2020 /// {@template phoneNumber}
21+ ///
2122 /// The phone number to which the OTP is to be sent.
2223 ///
2324 /// The phone number should also contain the country code.
2425 ///
2526 /// Example: +919876543210 where +91 is the country code and 9876543210 is the number.
27+ ///
2628 /// {@endtemplate}
2729 final String phoneNumber;
2830
2931 /// {@template onLoginSuccess}
32+ ///
3033 /// This callback is triggered when the phone number is verified and the user is
3134 /// signed in successfully. The function provides [UserCredential] which contains
3235 /// essential user information.
@@ -35,47 +38,58 @@ class FirebasePhoneAuthHandler extends StatefulWidget {
3538 /// verified manually by calling [verifyOTP] .
3639 ///
3740 /// True if auto verified and false is verified manually.
41+ ///
3842 /// {@endtemplate}
3943 final FutureOr <void > Function (UserCredential , bool )? onLoginSuccess;
4044
4145 /// {@template onLoginFailed}
46+ ///
4247 /// This callback is triggered if the phone verification fails. The callback provides
4348 /// [FirebaseAuthException] which contains information about the error.
49+ ///
4450 /// {@endtemplate}
4551 final FutureOr <void > Function (FirebaseAuthException )? onLoginFailed;
4652
4753 /// {@template timeOutDuration}
54+ ///
4855 /// The maximum amount of time you are willing to wait for SMS
4956 /// auto-retrieval to be completed by the library.
5057 ///
5158 /// Maximum allowed value is 2 minutes.
5259 ///
5360 /// Defaults to [FirebasePhoneAuthController.kTimeOutDuration] .
61+ ///
5462 /// {@endtemplate}
5563 final Duration timeOutDuration;
5664
5765 /// {@template recaptchaVerifierForWeb}
66+ ///
5867 /// Custom reCAPTCHA for web-based authentication.
5968 ///
6069 /// The boolean in the function is provided which can be used to check
6170 /// whether the platform is web or not.
6271 ///
6372 /// NOTE : Only pass a [RecaptchaVerifier] instance if you're on web, else an error occurs.
73+ ///
6474 /// {@endtemplate}
6575 final RecaptchaVerifier ? Function (bool )? recaptchaVerifierForWebProvider;
6676
6777 /// {@template builder}
78+ ///
6879 /// The widget returned by the `builder` is rendered on to the screen and
6980 /// builder is called every time a value changes i.e. either the timerCount or any
7081 /// other value.
7182 ///
7283 /// The builder provides a controller which can be used to render the UI based
7384 /// on the current state.
85+ ///
7486 /// {@endtemplate}
7587 final Widget Function (BuildContext , FirebasePhoneAuthController ) builder;
7688
7789 /// {@template signOut}
90+ ///
7891 /// Signs out the current user.
92+ ///
7993 /// {@endtemplate}
8094 static Future <void > signOut (BuildContext context) =>
8195 FirebasePhoneAuthController .of (context, listen: false ).signOut ();
0 commit comments