libphonenumber_plugin 0.3.3 libphonenumber_plugin: ^0.3.3 copied to clipboard
Flutter package for Google libphonenumber, for Android and Web. Uses Flutter Federated Package for interoperability.
libphonenumber_plugin #
Flutter plugin for Google libphonenumber.
⚠️ Notice #
This plugin has similar implementation with libphonenumber.
- This plugin now has support for
Android
,iOS
andWeb
,
Usage #
To use this plugin, add libphonenumber_plugin: ^any
as a dependency in your pubspec.yaml file.
- ⚠️ This plugin might merge with the original libphonenumber for Flutter in future, for now no info.
Android and iOS Usage #
This plugin now supports Android and iOS.
- Also For Stable Android and iOS implementation 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="assets/packages/libphonenumber_plugin/js/libphonenumber.js"></script>
<script src="assets/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 🚀 #
- Support for Windows and MacOS with Dart FFI
- Merge with the original libphonenumber for Flutter in future, for now no info.
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.