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

RegionInfo Formatted result unexpected #48

Open
willylaurents opened this issue Jun 15, 2022 · 0 comments
Open

RegionInfo Formatted result unexpected #48

willylaurents opened this issue Jun 15, 2022 · 0 comments

Comments

@willylaurents
Copy link

im have a code for autoformat like this:

Future<String> getFormattedPhoneNumber(String phoneNumber) async {
    final RegionInfo regionInfo = await PhoneNumberUtil.getRegionInfo(phoneNumber: phoneNumber, isoCode: 'id');
    return regionInfo.formattedPhoneNumber ?? phoneNumber;
}

when the phoneNumber is 0877123 the regionInfo result is [RegionInfo prefix=62, iso=ID, formatted=0877123]
when the phoneNumber is 08771234 the regionInfo result is [RegionInfo prefix=62, iso=ID, formatted=8771234]

in formatted property the 0 is missing.

@willylaurents willylaurents changed the title Formatted result unexpected RegionInfo Formatted result unexpected Jun 15, 2022
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

No branches or pull requests

1 participant