Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Update: Support for Flutter 3.22.3, Currency Fields, Search Enhancements, and More #397

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,16 @@
"contributions": [
"code"
]
},
{
"login": "sabikrahat",
"name": "Md. Sabik Alam Rahat",
"avatar_url": "https://avatars.githubusercontent.com/u/49031412?v=4",
"profile": "https://sabikrahat.github.io/",
"contributions": [
"code",
"doc"
]
}
],
"contributorsPerLine": 7,
Expand All @@ -114,4 +124,4 @@
"skipCi": true,
"commitType": "docs",
"commitConvention": "angular"
}
}
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
## [4.0.1] - Release

- Updated dependencies and adding support for Flutter 3.27.1.

## [4.0.0] - Release

- Updated dependencies and adding support for Flutter 3.22.3.
- `currencyName` `currencySymbol` field added for each country to display currency symbol and name.
- Add `minLines` `maxLines` `expands` `onTapOutside` parameters.
- Fix the validation issue when the phone number is empty.
- Enhance the search functionality. Now the search is case-insensitive and supports searching by country name, dial code, and country code and currency name.

## [3.3.0] - Release

- Add `magnifierConfiguration` to customize the magnifier.
Expand Down
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@

A customised Flutter TextFormField to input international phone number along with country code.

This widget can be used to make customised text field to take phone number input for any country along with an option to choose country code from a dropdown.
This widget can be used to make customised text field to take phone number input for any country along with an option to choose country code from a dropdown. You can also get the currency name and symbol for the selected country.

## ⚠️ The package is deprecated and this repository is no longer maintained ⚠️
<!-- ## ⚠️ The package is deprecated and this repository is no longer maintained ⚠️

As of June 2021, I, @marcaureln, have been maintaining this Flutter package initially created by @vanshg395. Regrettably, Vansh has been unresponsive, and I am unable to release new versions (the last release is 6 months old as of writing).

Considering this, I recommend users to explore alternatives on [pub.dev](https://pub.dev/) or, if interested, fork this repository for continued support. Life can be hectic, and I wish Vansh is doing well.

Thank you for your understanding and continued support.
Thank you for your understanding and continued support. -->

<details>
<summary>Old Readme</summary>
<!-- <details>
<summary>Old Readme</summary> -->

## Screenshots

Expand Down Expand Up @@ -111,6 +111,7 @@ Comment on Issue or Pull Request, asking @all-contributors to add a contributor:
<td align="center" valign="top" width="14.28%"><a href="https://github.com/The-Redhat"><img src="https://avatars.githubusercontent.com/u/33162310?v=4?s=100" width="100px;" alt="Gregor Weber"/><br /><sub><b>Gregor Weber</b></sub></a><br /><a href="https://github.com/vanshg395/intl_phone_field/commits?author=The-Redhat" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://beacons.ai/hanyi00i"><img src="https://avatars.githubusercontent.com/u/92980326?v=4?s=100" width="100px;" alt="Ooi Han Yi"/><br /><sub><b>Ooi Han Yi</b></sub></a><br /><a href="https://github.com/vanshg395/intl_phone_field/commits?author=hanyi00i" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://www.jimmyff.co.uk"><img src="https://avatars.githubusercontent.com/u/298850?v=4?s=100" width="100px;" alt="Jimmy Forrester-Fellowes"/><br /><sub><b>Jimmy Forrester-Fellowes</b></sub></a><br /><a href="https://github.com/vanshg395/intl_phone_field/commits?author=jimmyff" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://sabikrahat.github.io/"><img src="https://avatars.githubusercontent.com/u/49031412?v=4" width="100px;" alt="Md. Sabik Alam Rahat"/><br /><sub><b>Md. Sabik Alam Rahat</b></sub></a><br /><a href="https://github.com/vanshg395/intl_phone_field/commits?author=sabikrahat" title="Code">💻</a> <a href="https://github.com/vanshg395/intl_phone_field/commits?author=sabikrahat" title="Documentation">📖</a></td>
</tr>
</tbody>
</table>
Expand All @@ -124,4 +125,4 @@ Comment on Issue or Pull Request, asking @all-contributors to add a contributor:

This project is licensed under the MIT license. See [LICENSE](LICENSE) for more information.

</details>
<!-- </details> -->
13 changes: 8 additions & 5 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ void main() {
}

class MyApp extends StatefulWidget {
const MyApp({super.key});

@override
_MyAppState createState() => _MyAppState();
State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
GlobalKey<FormState> _formKey = GlobalKey();
final GlobalKey<FormState> _formKey = GlobalKey();

FocusNode focusNode = FocusNode();

Expand Down Expand Up @@ -63,22 +65,23 @@ class _MyAppState extends State<MyApp> {
),
languageCode: "en",
onChanged: (phone) {
print(phone.completeNumber);
debugPrint(phone.completeNumber);
},
onCountryChanged: (country) {
print('Country changed to: ' + country.name);
debugPrint('Country changed to: ${country.name}');
debugPrint('Currency changed to: ${country.currencyName} (${country.currencySymbol})');
},
),
SizedBox(
height: 10,
),
MaterialButton(
child: Text('Submit'),
color: Theme.of(context).primaryColor,
textColor: Colors.white,
onPressed: () {
_formKey.currentState?.validate();
},
child: Text('Submit'),
),
],
),
Expand Down
75 changes: 50 additions & 25 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ packages:
dependency: transitive
description:
name: collection
sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687
sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf
url: "https://pub.dev"
source: hosted
version: "1.17.2"
version: "1.19.0"
fake_async:
dependency: transitive
description:
Expand All @@ -65,44 +65,68 @@ packages:
path: ".."
relative: true
source: path
version: "3.2.0"
version: "4.0.1"
leak_tracker:
dependency: transitive
description:
name: leak_tracker
sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06"
url: "https://pub.dev"
source: hosted
version: "10.0.7"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379"
url: "https://pub.dev"
source: hosted
version: "3.0.8"
leak_tracker_testing:
dependency: transitive
description:
name: leak_tracker_testing
sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
url: "https://pub.dev"
source: hosted
version: "3.0.1"
matcher:
dependency: transitive
description:
name: matcher
sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e"
sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
url: "https://pub.dev"
source: hosted
version: "0.12.16"
version: "0.12.16+1"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41"
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
url: "https://pub.dev"
source: hosted
version: "0.5.0"
version: "0.11.1"
meta:
dependency: transitive
description:
name: meta
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
url: "https://pub.dev"
source: hosted
version: "1.9.1"
version: "1.15.0"
path:
dependency: transitive
description:
name: path
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
url: "https://pub.dev"
source: hosted
version: "1.8.3"
version: "1.9.0"
sky_engine:
dependency: transitive
description: flutter
source: sdk
version: "0.0.99"
version: "0.0.0"
source_span:
dependency: transitive
description:
Expand All @@ -115,26 +139,26 @@ packages:
dependency: transitive
description:
name: stack_trace
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377"
url: "https://pub.dev"
source: hosted
version: "1.11.0"
version: "1.12.0"
stream_channel:
dependency: transitive
description:
name: stream_channel
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
url: "https://pub.dev"
source: hosted
version: "2.1.1"
version: "2.1.2"
string_scanner:
dependency: transitive
description:
name: string_scanner
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3"
url: "https://pub.dev"
source: hosted
version: "1.2.0"
version: "1.3.0"
term_glyph:
dependency: transitive
description:
Expand All @@ -147,10 +171,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8"
sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c"
url: "https://pub.dev"
source: hosted
version: "0.6.0"
version: "0.7.3"
vector_math:
dependency: transitive
description:
Expand All @@ -159,13 +183,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.4"
web:
vm_service:
dependency: transitive
description:
name: web
sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10
name: vm_service
sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b
url: "https://pub.dev"
source: hosted
version: "0.1.4-beta"
version: "14.3.0"
sdks:
dart: ">=3.1.0-185.0.dev <4.0.0"
dart: ">=3.6.0 <4.0.0"
flutter: ">=3.18.0-18.0.pre.54"
2 changes: 1 addition & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1

environment:
sdk: ">=2.12.0 <3.0.0"
sdk: ">=3.6.0 <4.0.0"

dependencies:
flutter:
Expand Down
Loading