diff --git a/example/lib/demo/pages/all_pinputs_page.dart b/example/lib/demo/pages/all_pinputs_page.dart index 6a1551d..63af180 100644 --- a/example/lib/demo/pages/all_pinputs_page.dart +++ b/example/lib/demo/pages/all_pinputs_page.dart @@ -32,6 +32,16 @@ class _AllPinputsState extends State child: item.value, ); }), + const Padding( + padding: EdgeInsets.all(20), + child: TextField( + autofillHints: [AutofillHints.oneTimeCode], + decoration: InputDecoration( + labelText: 'Standard TextField for Testing', + border: OutlineInputBorder(), + ), + ), + ), ], ), ); diff --git a/lib/src/pinput_state.dart b/lib/src/pinput_state.dart index b207c70..cd4be6c 100644 --- a/lib/src/pinput_state.dart +++ b/lib/src/pinput_state.dart @@ -100,7 +100,7 @@ class _PinputState extends State /// Android Autofill void _maybeInitSmartAuth() async { - if (_smsRetriever == null) { + if (_smsRetriever == null && widget.smsRetriever != null) { _smsRetriever = widget.smsRetriever!; _listenForSmsCode(); } @@ -580,7 +580,6 @@ class _PinputState extends State uniqueIdentifier: autofillId, autofillHints: autofillHints, currentEditingValue: _effectiveController.value, - hintText: 'One Time Code', ) : AutofillConfiguration.disabled;