flutter-libphonenumber
flutter-libphonenumber copied to clipboard
Add support for web platform
I am using a library that depends on this libphonenumber library. When I run my app on the web browser, on localhost, I've been getting MissingPluginException errors coming from libphonenumber library. I have no issues with native apps.
pubspec.yaml:
international_phone_input: ^1.0.4
Error:
Error: MissingPluginException(No implementation found for method isValidPhoneNumber on channel codeheadlabs.com/libphonenumber) at Object.throw_ [as throw] (http://localhost:54687/dart_sdk.js:4773:11) at MethodChannel._invokeMethod (http://localhost:54687/packages/flutter/src/services/platform_channel.dart.lib.js:398:21)
Is there anything I can do to circumvent this?
I think you need some if statement to check what platform is running. Since I think this lib have no yet web implementation
am having the same issue any updates ?
As @kateile said, this does not support web yet. Pull requests are welcome, as it may be faster for someone else to add it, than wait for me.
@emostar Support for web platform already exists https://github.com/natintosh/plugin_libphonenumber
@cedvdb Hi, I don't understand from the link how to use it? Is this waiting to be merged into this package? Or use a different one? Thanks
Is there a plan to merge this in at some point?
@dorsamet there is this cross platform library https://pub.dev/packages/phone_numbers_parser
It's a rewrite (by me) of libphonenumber on android