Flutter: Android PhoneNumberUtil alternative in Flutter
I used PhoneNumberUtil class in Android to format phone number based on Local. Is there any alternative approch in Flutter?
I don't think so. You would have to port the parts you need, which shouldn't be too hard because it is pure java code. Here is the source code.
The best way (in absence of a library which does it for you) is to create a PlatformChannel to call specific platform code.
You can find more info about PlatformChannels here.
And you should use:
java libphonenumber for the Android part
ios porting of libphonenumber for the iOS part
I don't think so. You would have to port the parts you need, which shouldn't be too hard because it is pure java code. Here is the source code.
The best way (in absence of a library which does it for you) is to create a PlatformChannel to call specific platform code.
You can find more info about PlatformChannels here.
And you should use:
java libphonenumber for the Android part
ios porting of libphonenumber for the iOS part
Comments
Post a Comment