Skip to content

Commit

Permalink
Added Standard TextField in the Demo app for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Tkko committed Apr 17, 2024
1 parent 1bedba6 commit 4970eaf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
10 changes: 10 additions & 0 deletions example/lib/demo/pages/all_pinputs_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ class _AllPinputsState extends State<AllPinputs>
child: item.value,
);
}),
const Padding(
padding: EdgeInsets.all(20),
child: TextField(
autofillHints: [AutofillHints.oneTimeCode],
decoration: InputDecoration(
labelText: 'Standard TextField for Testing',
border: OutlineInputBorder(),
),
),
),
],
),
);
Expand Down
3 changes: 1 addition & 2 deletions lib/src/pinput_state.dart
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class _PinputState extends State<Pinput>

/// Android Autofill
void _maybeInitSmartAuth() async {
if (_smsRetriever == null) {
if (_smsRetriever == null && widget.smsRetriever != null) {
_smsRetriever = widget.smsRetriever!;
_listenForSmsCode();
}
Expand Down Expand Up @@ -580,7 +580,6 @@ class _PinputState extends State<Pinput>
uniqueIdentifier: autofillId,
autofillHints: autofillHints,
currentEditingValue: _effectiveController.value,
hintText: 'One Time Code',
)
: AutofillConfiguration.disabled;

Expand Down

0 comments on commit 4970eaf

Please sign in to comment.