From 875a2d404b2bb3ac82add93c5f38127c6713a7cf Mon Sep 17 00:00:00 2001 From: cedvdb Date: Wed, 28 Feb 2024 16:12:18 +0100 Subject: [PATCH] add demo --- CHANGELOG.md | 3 ++- README.md | 3 +++ demo/lib/main.dart | 6 +++++- pubspec.yaml | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 781c2fc..dcf7c45 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ - +## 8.2.1 +- add demo link in readme ## 8.2.0 - added VOIP support diff --git a/README.md b/README.md index 10c1315..988525a 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,9 @@ The advantage of this lib instead of libphonenumber is that it instantly support - Supports eastern arabic digits - Uses best-in-class metadata from Google's libPhoneNumber project. +## Demo + +[demo](https://cedvdb.github.io/phone_numbers_parser/) ## Contributing diff --git a/demo/lib/main.dart b/demo/lib/main.dart index a98dda1..f5eeba4 100644 --- a/demo/lib/main.dart +++ b/demo/lib/main.dart @@ -52,7 +52,11 @@ class _MyHomePageState extends State { label: Text('Phone number'), ), onChanged: (value) { - setState(() => this.phoneNumber = PhoneNumber.parse(value)); + try { + setState(() => this.phoneNumber = PhoneNumber.parse(value)); + } catch (e) { + setState(() => this.phoneNumber = null); + } }, ), const SizedBox(height: 12), diff --git a/pubspec.yaml b/pubspec.yaml index 007333e..af262b7 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: phone_numbers_parser description: Dart library for parsing phone numbers. Inspired by Google's libphonenumber and PhoneNumberKit for ios. -version: 8.2.0 +version: 8.2.1 homepage: https://github.com/cedvdb/phone_number_parser environment: