Skip to content

Commit

Permalink
add demo
Browse files Browse the repository at this point in the history
  • Loading branch information
cedvdb committed Feb 28, 2024
1 parent 7576d89 commit 875a2d4
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

## 8.2.1
- add demo link in readme

## 8.2.0
- added VOIP support
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 5 additions & 1 deletion demo/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ class _MyHomePageState extends State<MyHomePage> {
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),
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down

0 comments on commit 875a2d4

Please sign in to comment.