Skip to content

Handle omitted exit code correctly#6

Open
matteovhaxt wants to merge 1 commit intoLanarsInc:mainfrom
matteovhaxt:main
Open

Handle omitted exit code correctly#6
matteovhaxt wants to merge 1 commit intoLanarsInc:mainfrom
matteovhaxt:main

Conversation

@matteovhaxt
Copy link
Copy Markdown

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