File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
packages/firebase_ui_auth/lib/src/widgets Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -91,6 +91,9 @@ class PhoneInput extends StatefulWidget {
91
91
/// picker.
92
92
final String ? initialCountryCode;
93
93
94
+ /// Whether the phone input text field should be focused as soon as it's visible.
95
+ final bool autoFocus;
96
+
94
97
/// Returns a phone number from the [PhoneInput] that was provided a [key] .
95
98
static String ? getPhoneNumber (GlobalKey <PhoneInputState > key) {
96
99
final state = key.currentState! ;
@@ -106,6 +109,7 @@ class PhoneInput extends StatefulWidget {
106
109
const PhoneInput ({
107
110
super .key,
108
111
this .initialCountryCode,
112
+ this .autoFocus = true ,
109
113
this .onSubmit,
110
114
});
111
115
@@ -318,7 +322,7 @@ class PhoneInputState extends State<PhoneInput> {
318
322
autofillHints: const [
319
323
AutofillHints .telephoneNumberNational
320
324
],
321
- autofocus: true ,
325
+ autofocus: widget.autoFocus ,
322
326
focusNode: numberFocusNode,
323
327
controller: numberController,
324
328
placeholder: l.phoneInputLabel,
You can’t perform that action at this time.
0 commit comments