flutter-libphonenumber icon indicating copy to clipboard operation
flutter-libphonenumber copied to clipboard

Add support for web platform

Open febiyan opened this issue 4 years ago • 7 comments

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?

febiyan avatar Jun 06 '20 10:06 febiyan

I think you need some if statement to check what platform is running. Since I think this lib have no yet web implementation

kateile avatar Jun 29 '20 08:06 kateile

am having the same issue any updates ?

Yacine-Benali avatar Jul 01 '20 21:07 Yacine-Benali

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 avatar Oct 02 '20 17:10 emostar

@emostar Support for web platform already exists https://github.com/natintosh/plugin_libphonenumber

cedvdb avatar Mar 23 '21 13:03 cedvdb

@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

tigrenok00 avatar Oct 13 '21 13:10 tigrenok00

Is there a plan to merge this in at some point?

dorsamet avatar Apr 25 '22 09:04 dorsamet

@dorsamet there is this cross platform library https://pub.dev/packages/phone_numbers_parser

It's a rewrite (by me) of libphonenumber on android

cedvdb avatar Apr 25 '22 11:04 cedvdb