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

PlatformException(InvalidNumber, Number 4034717829 is invalid, null, null) #38

Open
2 of 7 tasks
wstrange opened this issue May 30, 2023 · 0 comments
Open
2 of 7 tasks
Labels
bug Something isn't working

Comments

@wstrange
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Package/Plugin version

2.0.1

Platforms

  • Android
  • iOS
  • Linux
  • MacOS
  • Web
  • Windows

Flutter doctor

flutter doctor -v
[!] Flutter (Channel stable, 3.10.2, on macOS 13.4 22F66 darwin-arm64, locale en-CA)
• Flutter version 3.10.2 on channel stable at /Users/warren/dev/flutter
! Warning: dart on your path resolves to /opt/homebrew/Cellar/dart/3.0.2/libexec/bin/dart, which is not inside your current Flutter SDK checkout at /Users/warren/dev/flutter. Consider adding
/Users/warren/dev/flutter/bin to the front of your path.
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 9cd3d0d9ff (7 days ago), 2023-05-23 20:57:28 -0700
• Engine revision 90fa3ae28f
• Dart version 3.0.2
• DevTools version 2.23.1
• If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at /Users/warren/Library/Android/sdk
• Platform android-33, build-tools 31.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 14E222b
• CocoaPods version 1.12.1

[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.2)
• 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.6+0-17.0.6b802.4-9586694)

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

[✓] Connected device (3 available)
• Pixel 6 (mobile) • adb-1A021FDF6001YN-JUzR7Q._adb-tls-connect._tcp. • android-arm64 • Android 13 (API 33)
• macOS (desktop) • macos • darwin-arm64 • macOS 13.4 22F66 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 113.0.5672.126

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

Minimal code example

      FormBuilderPhoneField(
              name: 'phone',
              initialValue: user.phone,
              decoration: const InputDecoration(
                labelText: 'Phone Number',
                hintText: 'phone',
              ),
              // priorityListByIsoCode: ['EN'],
              validator: FormBuilderValidators.compose([
                FormBuilderValidators.required(),
              ]),
            ),

Current Behavior

On android, consistently getting the PlatformException. I have tried various number formats (no dashes, with dashes, leading +1 , no leading 1, etc)

This is no doubt caused by the underlying phone library (and on the android native library), but it seems like this wrapper should handle exceptions from the underlying library?

Possibly related to flutter-form-builder-ecosystem/phone_number#101

Expected Behavior

Phone number validates OK and saves

Steps To Reproduce

FormBuilderPhoneField(

Aditional information

No response

@wstrange wstrange added the bug Something isn't working label May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant