Skip to content

PhoneInputFormatter broken in release 2.13.8 #177

@olliewild

Description

@olliewild

The latest release broke PhoneInputFormatter. A simplified version of my code is:

return TextFormField( textCapitalization: TextCapitalization.none, keyboardType: TextInputType.phone, inputFormatters: [ PhoneInputFormatter( onCountrySelected: (country) { _phoneCountryCode = country?.countryCode; }, ) ], controller: widget.controller, focusNode: _focusNode, ); }

Previously, typing "16309999999" would cause the phone to be formatted as "+1 (630) 999 9999". Now, it detects that this is a U.S. phone number, but it messes up the formatting and drops the trailing digit: "(163) 099 9999".

I believe the culprit is commit 4798c2d.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions