libphonenumber_plugin

Flutter plugin for Google libphonenumber.

:warning: Notice

This plugin only support Web for now, and has similar implementation with libphonenumber.

Usage

To use this plugin, add libphonenumber_plugin: ^any as a dependency in your pubspec.yaml file.

:warning: For Android and IOS usage use libphonenumber.

Android and IOS Usage

This plugin does not support Android and IOS yet use libphonenumber, since it was inspired by and has similar implementation with libphonenumber.

Web Usage

In your app directory, edit web/index.html to add the following


<!DOCTYPE html>
<html>
    <head>
        ...
    </head>
    <body>
    
        ...

        <script src="packages/libphonenumber_plugin/js/libphonenumber.js"></script>
        <script src="packages/libphonenumber_plugin/js/stringbuffer.js"></script>

        ...

        <script src="main.dart.js" type="application/javascript"></script>
    </body>
</html>

Using the plugin

Once you have added libphonenumber_plugin plugin and edit web/index.html, you should be able to use the

import 'package:libphonenumber_plugin/libphonenumber_plugin.dart';

or any other source library available later on

Available Methods

For available methods see libphonenumber_platform_interface

Future Works :rocket:

  • Support for Windows and MacOS with Dart FFI
  • Support for Android and IOS (Unsure)

Contributions

If you encounter any problem or the library is missing a feature feel free to open an issue. Feel free to fork, improve the plugin and make pull request.

Contributors

Made with contributors-img.

Libraries

libphonenumber_plugin