Flutter AutofillHints oneTimeCode doesn't work

1,248

From Flutter docs at https://master-api.flutter.dev/flutter/material/TextField/autofillHints.html "Some autofill hints only work with specific keyboardTypes". Try changing the keyboardType. For example:

TextField(
 controller: controller,
 autofillHints: const <String>[AutofillHints.oneTimeCode],
 keyboardType: TextInputType.text,
 onChanged: onChanged,
),
Share:
1,248
Osman Osman
Author by

Osman Osman

Updated on December 27, 2022

Comments

  • Osman Osman
    Osman Osman over 1 year

    I want to catch OTP sms code but it doesn't work on IOS. I need show the code upper of keyboard.

    my code block is;

    TextField(
     controller: controller,
     autofillHints: const <String>[AutofillHints.oneTimeCode],
     keyboardType: TextInputType.number,
     onChanged: onChanged,
    ),