Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle omitted exit code correctly #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

matteovhaxt
Copy link

Hey there ✌🏻,
I stumbled upon this issue in my application, because supabase auth omits the exitCode. This resulted in the number being incorrectly displayed when being parsed by the PhoneController.

To reproduce this give the PhoneInput in the example app a controller with a default value like this (notice the omitted +):

final number = '4917612345678';
...
PhoneInput(
   controller: PhoneController(PhoneNumber.parse(number)),
   ...
   ),

This will result in the PhoneInput showing the correct countryCode but not removing the countryCode from the nsn. Effectively showing the user this faulty output:
Screenshot 2024-04-29 at 13 55 55

Instead of the correct number:
Screenshot 2024-04-29 at 13 55 26

Thanks for building the package though, handling phone numbers is always a great pain which this package helped me with, a lot! πŸ‘πŸ»

@matteovhaxt matteovhaxt changed the base branch from develop to main April 29, 2024 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant