caseyryan / flutter_multi_formatter

A set of formatters for text and input fields. Not only it can format a phone number but also automatically detect a country dial code and the name of the country. It also can apply formatting for currencies e.g. you need to convert 100000 into a USD currency value representation. Add MoneyInputFormatter and you can get it e.g. like: $100,000.00 right on the fly or whatever you need. Just see the example of usage
https://pub.dev/packages/flutter_multi_formatter
Other
308 stars 75 forks source link

Something wrong with RU and KZ phone code #47

Closed karabanovbs closed 3 years ago

karabanovbs commented 3 years ago

Why KZ code is 77?

Wikipedia says that Kz and Ru have the same code: Kazakhstan Russia

How we can detect Kz phone?

caseyryan commented 3 years ago

I've rejected this commit because it has an incorrect solution. You are right about 7 but it's not because I've mistakingly did it. It's for another reason. I'll make a correct way to get a real phone code later

caseyryan commented 3 years ago

It's fixed in version 2.1.2. Now phoneCode property will return correct code 7 for Kazakhstan but internal code for the system now lives in 'internalPhoneCode' property not accessible from the outside