flutter-form-builder-ecosystem / phone_number

Flutter plugin for parsing, formatting and validating international phone numbers.
https://pub.dev/packages/phone_number
BSD 3-Clause "New" or "Revised" License
81 stars 63 forks source link

Update the libphonenumber and phonenumberKit version #119

Open rohnsht opened 10 months ago

rohnsht commented 10 months ago

Is there an existing issue for this?

Package/Plugin version

2.0.1

Platforms

Flutter doctor

[flutter] flutter doctor -v [✓] Flutter (Channel stable, 3.16.5, on macOS 14.2.1 23C71 darwin-arm64, locale en-AU) • Flutter version 3.16.5 on channel stable at /Users/rohan/Development/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 78666c8dc5 (5 weeks ago), 2023-12-19 16:14:14 -0800 • Engine revision 3f3e560236 • Dart version 3.2.3 • DevTools version 2.28.4

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) • Android SDK at /Users/rohan/Library/Android/sdk • Platform android-34, build-tools 34.0.0 • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314) • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.2) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 15C500b • CocoaPods version 1.14.3

[✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome) ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[✓] Android Studio (version 2023.1) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)

[✓] VS Code (version 1.85.2) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.80.0

[✓] Connected device (2 available) • sdk gphone64 arm64 (mobile) • emulator-5554 • android-arm64 • Android 14 (API 34) (emulator) • macOS (desktop) • macos • darwin-arm64 • macOS 14.2.1 23C71 darwin-arm64

[✓] Network resources • All expected network resources are available.

! Doctor found issues in 1 category. exit code 0

Minimal code example

try {
                final phoneNumber = await _phoneNumberUtil
                    .parse(_phoneController.text, regionCode: _regionCode);
                _phoneNumber = phoneNumber.e164;

                FocusScope.of(context).unfocus();
                _verifyPhoneWithFirebase();
              } catch (e) {
                print(e);
                ScaffoldMessenger.of(context).showSnackBar(
                  SnackBar(
                    content: Text(
                        AppLocalizations.of(context).translate("phone_error")),
                  ),
                );
              }

Current Behavior

It can't validate certain phonenumbers correctly such as +61494066635

Expected Behavior

The package says the above number is invalid even when its a valid Australian number.

Steps To Reproduce

No steps

Aditional information

No response