ezet / stripe-sdk

A simple and flexible Stripe library for Flutter with complete support for SCA and PSD2.
https://pub.dev/packages/stripe_sdk
Other
137 stars 137 forks source link

Fixed iOS keyboard not becoming NumberPad in Card Number Form field #141

Closed riscait closed 2 years ago

riscait commented 3 years ago

There seems to be a bug in Flutter that keyboardType: TextInputType.number is currently disabled when autofillHints: [AutofillHints.creditCardNumber] is specified. The keyboard is not fixed to NumberPad and can be switched.

If you remove keyboardType: TextInputType.number, keyboardType: TextInputType.number is enabled and the keyboard is now number-only as expected.

The autofillHints: [AutofillHints.creditCardNumber] seems to have been added when the TextFormField was added to PostalCode.

If you have any other workarounds, please let me know, but currently removing AutofillHints.creditCardNumber seems to be the easiest solution.

The issue was confirmed on Flutter 2.0.6, iOS14.5 | 15 Beta.

Related Issues

TextField 'keyboardType: TextInputType.number' doesn't bring the number keyboard https://github.com/flutter/flutter/issues/58510

Screenshot

Before

After

ezet commented 2 years ago

This is getting fixed through some other means :)